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.
相关推荐
酒神dnspup1 分钟前
多地区网站可用性监控怎么做?DNSPup 从基线到告警的完整实战
运维·ios·云计算·iphone·dns·网络监控
等我调个Bug9 分钟前
Linux基本指令
linux·服务器
在角落发呆8 小时前
工具配置备份步骤:从手动备份到自动化方案
运维·windows·自动化
_upupup9 小时前
Linux的调试工具——gdb/cgdb
linux·服务器
百度一下吧9 小时前
Nginx 使用手册:从安装配置到实战部署
运维·nginx
JeJe同学10 小时前
Docker镜像导入、容器启动
linux·运维·docker
Jason_zhao_MR10 小时前
Linux与实时控制如何兼得
linux·嵌入式硬件·机器人·工业控制
回眸&啤酒鸭10 小时前
【回眸】自动化白盒测试落地实战指南
运维·自动化·log4j
闲云野鹤在人间11 小时前
MySQL|从理论、安装、备份到主从复制、MHA高可用详解
linux·运维·数据库·mysql·云计算
一个风轻云淡11 小时前
GCC 和 GDB命令简单解读
java·linux·前端