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.
相关推荐
大柏怎么被偷了7 分钟前
【Git】基本操作
linux·运维·git
小女孩真可爱7 分钟前
大模型学习记录(八)---------RAG评估
linux·人工智能·python
纯粹的热爱9 分钟前
Windows 10/11解决“无法访问共享文件夹—组织安全策略阻止未经身份验证的来宾访问”
运维
乾元18 分钟前
AI + Jinja2/Ansible:从自然语义到可执行 Playbook 的完整流水线(工程级深度)
运维·网络·人工智能·网络协议·华为·自动化·ansible
我在人间贩卖青春23 分钟前
查看文件相关命令
linux·查看文件
飞行增长手记24 分钟前
IP协议从跨境到物联网的场景化应用
服务器·前端·网络·安全
GDAL28 分钟前
客户端与服务器SSL协议/加密套件不兼容:完整解决方案
服务器·ssl
番茄你个西红432 分钟前
安装KingbaseES时服务器swap的设置
linux·数据库
瀚高PG实验室1 小时前
如何将HGDB安全版(RPM包形式)安装在非root用户下
服务器·网络·安全·瀚高数据库
python百炼成钢1 小时前
50.linux_USB驱动
linux·运维·服务器·驱动开发