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.
相关推荐
是个普通苗39 分钟前
Centos 8 安装教程(新手版)
linux·运维·centos
钡铼技术物联网关42 分钟前
ARM架构+CODESYS:解锁嵌入式边缘计算的实时控制新范式
大数据·linux·arm开发·人工智能·边缘计算
kfepiza43 分钟前
MBR的 扩展分区 和 逻辑分区 笔记250406
linux·windows
嘿嘿-g1 小时前
华为IP(4)
服务器·网络·华为
BC橡木1 小时前
Linux动静态库
linux
陈苏同学1 小时前
Docker 从入门到进阶 (Win 环境) + Docker 常用命令
linux·运维·docker·容器
罗念笙1 小时前
说下你常用的Linux命令?
linux·操作系统
H1346948902 小时前
svn服务器数据备份,svn服务器数据备份的方法你会吗?
服务器·svn·负载均衡
车载测试工程师2 小时前
ARXML文件解析-2
java·服务器·网络·数据库·经验分享·网络协议·车载系统
love530love2 小时前
记一次不太顺利的Docker重装
运维·docker·容器