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.
相关推荐
执伞人ONLY32 分钟前
AI知识库自动化知识加工没做对,人工整理永远追不上知识产生
运维·人工智能·自动化
slongzhang_34 分钟前
linux 递归删除源码文件|递归删除目录下 *.js,但排除 *.min.js
linux·开发语言·javascript
叼烟扛炮36 分钟前
Linux 学习笔记(三十三):线程互斥——互斥锁(Mutex)与死锁
linux·运维·服务器·笔记·学习·1024程序员节
无足鸟ICT1 小时前
【RHCA+】who命令(查看已登陆用户)
linux·运维·服务器
Escalating_xu1 小时前
【Linux 网络编程】应用层协议 HTTP(下):Header、连接管理与 C++ HTTP 服务器
linux·服务器·网络
RacentCLM1 小时前
证书即服务CaaS:从申请、续期到部署的自动化链路拆解
运维·数据库·自动化·ssl
注塑机数据采集联网2 小时前
注塑机生产管控MES系统应用
大数据·运维·服务器·人工智能·物联网
海宇服务2 小时前
零信任架构实战:基于海宇全国车辆配置查验构建自动化二手商用车出厂参数建档网关
运维·人工智能·架构·自动化·1024程序员节
GeW3 小时前
新质生产力路线图落地,Linux运维与数据库架构师的机会清单
linux