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.
相关推荐
A.A呐23 分钟前
【Linux第七章】进程切换和命令行参数
linux
抓饼先生25 分钟前
iceoryx编译和验证
linux·c++·零拷贝·iceoryx
栈低来信2 小时前
SLUB分配器
linux
吕司2 小时前
Linux信号产生
linux·运维·服务器
A.A呐2 小时前
【Linux第九章】程序地址空间
linux
打码人的日常分享3 小时前
数据中心信息中心信息科管理制度
大数据·运维·网络·云计算·制造
vortex53 小时前
Linux 终端优化:Alacritty + Zellij 配置指南
linux·kali·终端模拟器
juncaixingchilove4 小时前
Linux轻量级浏览器
运维·服务器
码农编程录4 小时前
【notes11】并发/IO/内存
linux
cuijiecheng20184 小时前
Linux下MyIpAdd库的使用
linux·运维·服务器