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.
相关推荐
GlobalSign数字证书6 分钟前
小企业零运维 TLS 架构设计:证书生命周期管理(CLM)与自动化轮换策略的技术选型
运维·自动化
mCell21 分钟前
GitHub Actions 玩法大赏:一台远程主机的七种活法
linux·github·agent
盐焗鹌鹑蛋33 分钟前
【Linux】动静态库的制作与使用
linux
wuyk55541 分钟前
Python 第三章:列表 List
服务器·开发语言·python
艾伦_耶格宇1 小时前
【ELK】-4 logstash的搭建及操作
linux·运维·ubuntu·elk
mifengxing2 小时前
文件逻辑结构、物理结构与磁盘空闲存储空间管理
大数据·linux·运维·操作系统·计算机408
xcLeigh3 小时前
Go入门:无类型常量与类型常量的区别
服务器·开发语言·golang
小此方4 小时前
Re:Linux系统篇(五十七)线程篇 · 十:基于环形缓冲的生产者消费者模型与信号量
linux·运维·驱动开发
fanged4 小时前
Linux的DD命令
linux·运维·服务器
华清远见成都中心5 小时前
FreeRTOS事件组(Event Group)的工作机制分析
服务器·网络·网络协议