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.
相关推荐
bksczm1 天前
Linux之基础开发工具(Ubuntu)之编译器
linux·运维·服务器
何中应1 天前
Ansible安装&使用
运维·自动化·ansible·运维开发·自动化运维
Jun6261 天前
【RV1103】AD4115实现8通道ADC采样,MQTT数据传输,1K采样率
linux·python
嵌入式×边缘AI:打怪升级日志1 天前
DS18B20 Linux 驱动开发实战:从时序图到温度读取的保姆级教学
linux·驱动开发
橘颂TA1 天前
【Linux】自旋锁
linux·开发语言·数据库·c++
一脸dio样7541 天前
第5章 保护模式进阶,向内核迈进
linux·开发语言
byoass1 天前
自动化任务系列之六:自动整理文件——按时间/关键字分类归档实战
运维·网络·安全·自动化·云计算
代码中介商1 天前
Linux 信号处理与进程控制深度解析
linux·运维·信号处理
姚青&1 天前
Linux 文件处理命令
linux·运维·服务器
枷锁—sha1 天前
【CTFshow-pwn系列】03_栈溢出【pwn 072】详解:无字符串环境下的多级 Ret2Syscall 与 BSS 段注入
服务器·网络·汇编·笔记·安全·网络安全