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.
相关推荐
不能跑的代码不是好代码8 小时前
Linux系统常用命令中文速查表
linux·运维·服务器
石一峰6999 小时前
深入理解 Linux 中断三层机制与 1-Wire 时序锁原理
linux·运维·服务器
运维老郭9 小时前
PostgreSQL编译安装实战
运维·postgresql
无限码农10 小时前
Linux上通过cmake编译uchardet
linux·运维·服务器
运维大师11 小时前
【Linux运维极简教程】06-网络配置与管理
linux·运维
007张三丰12 小时前
软件测试专栏(15/20):REST Assured接口自动化框架实战
运维·自动化·jenkins·接口自动化·rest·assured
ACP广源盛1392462567312 小时前
IX8024@ACP# 搭配此芯 AI 服务器 + 爱芯元智产品完整方案
大数据·运维·服务器·人工智能·分布式·嵌入式硬件
Hiyajo pray13 小时前
SDN 访问控制性能调优方法
服务器·网络·网络安全
探索云原生14 小时前
终于搞懂 Kueue:5 个核心对象一次讲透
linux·docker·ai·云原生·kubernetes
huainingning14 小时前
交换机通过ftp下载文件或者传输文件到ftp服务器
运维·服务器·网络