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.
相关推荐
小义_3 分钟前
Linux 补充
linux·服务器
晴天的雨.9925 分钟前
【Linux】Shell 命令以及运行原理+权限管理
linux·运维·服务器
djjjx.9 分钟前
Linux工具篇 (六):GDB 调试从底层逻辑到高阶实战
linux·运维·服务器·gdb
IT大白鼠12 分钟前
彭大帅的AI运维助手实战案例 5 · 新接手的服务器,先让 AI 摸底
运维·服务器·人工智能
coward9130 分钟前
RK3576 双千兆 GMAC 驱动加载异常问题排查与总结
linux
幼儿园蛋小黄40 分钟前
从设备树到 ARM 驱动:嵌入式 Linux 驱动开发学习总结
linux·arm开发·驱动开发
dishugj1 小时前
HANA集群计划内切换与维护操作
java·linux·数据库
该逃避避1 小时前
出海广告跑不起来怎么办?动态住宅IP助力广告跑量
运维·服务器·网络
一条泥憨鱼1 小时前
【从0开始学习计算机网络】| ip协议-ttl-标识-分片偏移-ip分片与重组
运维·服务器·网络
爱吃香菜的初学者3 小时前
十四.Linux——消息队列
linux·运维·开发语言