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.
相关推荐
土星云SaturnCloud10 分钟前
智慧港口边缘计算:基于土星云边缘计算设备的三级架构设计与实战
服务器·人工智能·ai·边缘计算
lightqjx13 分钟前
【Linux系统】程序地址空间(初识)
linux·页表·地址空间
funnycoffee12316 分钟前
华为USG防火墙端口有收光,无法UP故障
服务器·网络·华为
wljy122 分钟前
二、线程操作
linux·线程属性·线程操作
其实防守也摸鱼24 分钟前
运维--ip单日获取去重数据量超过500条
运维·学习·tcp/ip·安全·web安全·安全威胁分析·工具
泰和英杰1 小时前
2026 华为数字能源 + 机房工程实操标准:故障排查、机房建设、设备选型标准化技术方案
运维·服务器·网络
mounter6251 小时前
探索未来 AI 算力网络的基石:从传统 RoCE 走向 SRv6 驱动的弹性弹性网络(解析 Netdev 0x1A 创新实践)
linux·网络·人工智能·linux kernel·kernel·rdma·rocev2
x_x-F1 小时前
深入浅出 Linux 网络核心:sk_buff 的内存与指针流转
linux·运维·网络
腾渊信息科技公司10 小时前
工业数据运维痛点根治方案:基于AI Agent的产线自动化台账系统落地
运维·人工智能·自动化·个人开发·ai编程
Dxy123931021610 小时前
Proxy Protocol v2 详解
运维