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.
相关推荐
Run_Teenage12 分钟前
Linux:深刻理解缓冲区
linux
youxiao_9032 分钟前
kubernetes 概念与安装(一)
linux·运维·服务器
凡梦千华37 分钟前
logrotate日志切割
linux·运维·服务器
wdfk_prog42 分钟前
[Linux]学习笔记系列 -- [fs][proc]
linux·笔记·学习
ELI_He9991 小时前
Airflow docker 部署
运维·docker·容器
拜托啦!狮子2 小时前
安装和使用Homer(linux)
linux·运维·服务器
liulilittle2 小时前
XDP VNP虚拟以太网关(章节:一)
linux·服务器·开发语言·网络·c++·通信·xdp
Sapphire~2 小时前
Linux-13 火狐浏览器书签丢失解决
linux
不染尘.2 小时前
进程切换和线程调度
linux·数据结构·windows·缓存
剑之所向3 小时前
c# modbus大小端
linux·运维·网络