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.
相关推荐
Meta Luo1 小时前
页面改版后自动化用例大量失败,应该怎么维护?
运维·功能测试·测试工具·自动化
爱和冰阔落1 小时前
【Linux】线程安全进阶:单例模式、可重入函数与死锁排查
linux·运维·安全·单例模式
dk_tjy1 小时前
迪康网络运维故障自愈的自动化闭环技术路径分析
运维·网络·自动化
先知后行。1 小时前
pimpl
linux
吉普赛的歌1 小时前
如何设置服务器固定时间点自动重启一次
运维·服务器
Carol06302 小时前
上肢及肩肘关节
java·服务器·数据库
帷幕落秋2 小时前
SSH远程管理服务
运维·ssh
一世繁华行2 小时前
CAPL浏览器(翻译自官方文档)
运维·服务器·数据库
万联WANFLOW2 小时前
让分散的设备像在同一张局域网里:企业组网技术解析
运维·网络·网络安全·智能路由器
风翼靓崽2 小时前
ubuntu22.04 rsyslog分离ssh单独日志文件
运维·ssh