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.
相关推荐
星恒随风10 分钟前
Linux进程间通信(一):从匿名管道、命名管道到进程池,深入理解Pipe、FIFO与文件描述符
linux·运维·笔记·学习·状态模式
wuminyu25 分钟前
ZGC染色指针在虚拟线程stackChunkOop上的并发屏障全景分析
java·linux·c语言·jvm·c++
刘胡子大叔1 小时前
服务器不能编译怎么办
运维·服务器
硅基手札1 小时前
【I2C 技术系列 11】I2C Linux 驱动框架
linux·驱动开发·stm32·单片机·嵌入式硬件·mcu·计算机外设
imDwAaY1 小时前
程序里的地址是真实内存地址吗?从虚拟内存到地址转换
java·linux·服务器
INGNIGHT1 小时前
486. 预测赢家(博弈dp/区间dp)
linux·c++
每日品牌解读1 小时前
企业经由 API 调用大模型,推荐哪些拥有数据隐私保护能力的平台?
运维·网络
竣达技术1 小时前
就地显示 + 远程上传,铅酸蓄电池在线监测完整解决方案
运维·数据库
Allstar_432 小时前
拆解全星APQP系统的六大核心质量工具如何联动——汽车供应链企业专业级研发项目管理系统
运维·服务器
随便写个软件2 小时前
【新版本】EasyExplorer资源管理器 3.12.0——地址栏重要更新
运维·服务器·前端·everything·资源管理器