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.
相关推荐
码农客栈30 分钟前
Linux I2C驱动实验
linux·运维·驱动开发
爱喝水的鱼丶1 小时前
SAP-ABAP:隐式/显式增强开发规范与避坑指南:10 类典型错误与运维方案
运维·性能优化·sap·abap·增强·经验交流
OpenPomeloxCommunity2 小时前
Linux 驱动基础(二):驱动自动加载的设计与实现
linux
企业解惑小助手2 小时前
如何禁止文字复制?企业文档防复制项目需求拆解方案
运维·数据库·安全
蓝速科技3 小时前
酒店门店 AI 数字人前台场景适配与落地指南
大数据·运维·数据结构·数据库·人工智能·科技
yyk333243 小时前
Linux常见的基础命令
linux·运维·服务器
名字还没想好☜3 小时前
Docker 镜像瘦身进阶:用 distroless/scratch 把 Go 服务打到 10MB,以及没 shell 怎么调试
运维·docker·容器·golang·kubernetes
JavaPub-rodert3 小时前
Docker 深入理解:从容器原理到生产环境最佳实践
运维·docker·容器
启博网络3 小时前
实战:无公网IP环境下的企业异地组网方案(附拓扑与IP规划)
linux·网络·tcp/ip
qq_395716174 小时前
RAID 相关操作,哪些操作会直接彻底销毁阵列数据?
服务器·网络·raid