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.
相关推荐
吕了了6 分钟前
87 Windows 系统安装的本质是什么?
运维·windows·电脑·系统
阿里巴巴P8资深技术专家1 小时前
docker容器启动报错
运维·docker·容器
杨云龙UP1 小时前
MySQL 8.0.x InnoDB 写入链路优化:Redo Log 与 Buffer Pool 扩容与缓冲区调优实战记录-20251029
linux·运维·数据库·sql·mysql
hashiqimiya1 小时前
两个步骤,打包war,tomcat使用war包
java·服务器·前端
我命由我123452 小时前
python-dotenv - python-dotenv 快速上手
服务器·开发语言·数据库·后端·python·学习·学习方法
txzz88882 小时前
CentOS-Stream-10 系统安装之网络设置
linux·运维·服务器·网络·计算机网络·centos
qq_401700412 小时前
嵌入式Linux网口MAC地址修改
linux·运维·macos
qq_310658512 小时前
mediasoup源码走读(六)——NetEQ
服务器·c++·音视频
Xの哲學3 小时前
Linux DRM 架构深度解析
linux·服务器·算法·架构·边缘计算
秋刀鱼 ..3 小时前
第三届信息化教育与计算机技术国际学术会议(IECA 2026)
运维·人工智能·科技·机器学习·制造