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.
相关推荐
CodexDave4 小时前
数据库连接池耗尽:排查顺序与三层兜底
服务器·前端·数据库·git·云原生·容器·kubernetes
weixin_307779134 小时前
Linux下Jenkins数据故障的系统化排查Shell脚本
linux·运维·服务器·jenkins
荒--4 小时前
Burp Suite(二)
linux·运维·服务器
YangYang9YangYan4 小时前
2026自动化背景无项目经验转数据分析的可行性分析
运维·数据分析·自动化
土星云SaturnCloud4 小时前
MP_SENet轻量语音降噪模型在土星云边缘设备的部署实战
服务器·人工智能·ai·边缘计算·语音识别
internet Boy4 小时前
服务器机房硬件入门教程
运维·服务器
小白还菜5 小时前
linux(Debian)使用mdadm组磁盘RAID1阵列
linux·运维
三8445 小时前
BGP/BGP路由反射器/联邦/BGP属性/BGP选路
运维·服务器·网络
Lumistory5 小时前
超高层地标泛光照明落地:从方案到运维的避坑思路
运维·光照贴图
2301_794461575 小时前
Activiti/BPMN 2.0 的 4 种网关
java·服务器·开发语言