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.
相关推荐
扛枪的书生10 分钟前
Nginx 学习总结
linux
桌面运维家16 分钟前
DHCP监控:IP冲突诊断与网络稳定运维实战
运维·网络·tcp/ip
曹牧44 分钟前
JSON 数组的正确使用方式
java·服务器·前端
石头猫灯1 小时前
DNS 服务器配置实验
运维·服务器
认真的薛薛1 小时前
Docker网络模式
linux·运维·数据库·面试·github
民乐团扒谱机1 小时前
【读论文】Frequency Comb Based Optical Time Transfer基于光频梳的光时间传递
运维·服务器
UP_Continue1 小时前
Linux--日志的模拟实现
linux·运维·服务器
xlp666hub1 小时前
深度剖析Linux Input子系统(1):宏观架构与核心原理
linux
东北甜妹2 小时前
playbook
linux·服务器·网络
YMWM_2 小时前
docker在jetson thor的应用
运维·docker·容器·jetson thor