linux后台启动命令

后台启动:nohup bin/hive --service metastore >> logs/metastore.log 2>&1 &
Linux shell中2>&1的含义解释 (全网最全,看完就懂)
Shell 输入/输出重定向

nohup:

  1. nohup stands for "no hang up". It allows a command to continue running even after the user who issued the command logs out or closes the terminal.

    When a command is prefixed with nohup, it ensures that the command is immune to hangups (i.e., disconnections from the controlling terminal).

    &:

  2. The & (ampersand) operator is used to run a command in the background. It allows the user to continue using the terminal while the command is running.

    When a command is followed by &, it runs asynchronously in the background, and the user can continue issuing other commands in the same terminal session.

  • nohup ensures that a command keeps running even after the terminal is closed, while & runs a command in the background, allowing the user to continue using the terminal for other tasks. However, without nohup, background processes started with & will terminate if the terminal is closed.
相关推荐
猫吃了源码2 小时前
k9s简介和安装
linux·docker·kubernetes
IPdodo_2 小时前
静态 IP、住宅 IP 和固定出口有什么区别?开发场景选型指南
服务器·网络·网络协议·tcp/ip·代理ip
云原生指北3 小时前
Docker Sandboxes 上手:从安装到第一次跑 Agent
运维·docker·容器
小马同学-3 小时前
高可用-Keepalived全解析
linux·运维
ziyun6668883 小时前
Docker 容器化 Web 服务架构搭建与自动化运维项目
运维·docker·架构
wavemap3 小时前
HyperPHP 免费主机无限流量
服务器·php
Forever Nore3 小时前
LeetCode 13 罗马数字转整数 - 按规则处理
linux·服务器·leetcode
我不会插花弄玉4 小时前
2.Linux基础指令下【由浅入深-Linux】
linux·服务器
梦想的旅途24 小时前
企微 API 二次开发:利用 AI Agent 实现自动化运维
运维·人工智能·企业微信
安科瑞-小李4 小时前
铁路智能运维进化路线:自动化→状态可视→预测维护
运维·自动化·数据采集·能耗可视化