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.
相关推荐
风景的人生4 分钟前
Linux虚拟机网络故障排查与解决方案
运维·网络·ssh
..Dauntless..20 分钟前
【Linux】权限问题——拥有者、所属组和其他用户的协调
linux·运维·服务器
平行云32 分钟前
实时云渲染信创架构解析:从GPU池化到全栈适配的技术演进
linux·unity·docker·ue5·webgl·数字孪生·实时云渲染
handler0133 分钟前
【Linux】信号:内核的“敲门声”
linux·运维·服务器·c++·c·信号·signal
T1mzhou35 分钟前
ARM64 Linux 6.10内核启动流程6-psci.c和ATF/U-Boot 的电源接口
linux·服务器·c语言
lucybean011 小时前
食品加工行业污水处理曝气装置采购避坑与合规筛选指南
运维
harmony&1 小时前
DevOps进阶:SonarQube 代码审计与 Harbor 镜像仓库实战
运维·devops
Neighbor_OldY1 小时前
CSRF跨站请求伪造攻击检测与应急处置实战:伪造请求识别与防护落地
运维·安全·web安全
生活爱好者!1 小时前
NAS能批量做短视频?docker部署MoneyPrinterTurbo
运维·docker·容器
ch3nyuyu1 小时前
驱动第三阶段
linux