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.
相关推荐
蜜蜜不吃糖13 分钟前
ESXI主机重置带外密码
linux·运维·服务器
王道长服务器 | 亚马逊云30 分钟前
AWS CloudTrail:让每一次操作都“有迹可循”
服务器·网络·云计算·智能路由器·aws
智象科技32 分钟前
CMDB报表体系如何驱动智能运维
大数据·运维·报表·一体化运维·cmdb
ZhiqianXia37 分钟前
Linux SysRq
linux
Zach_yuan38 分钟前
版本控制器Git
linux·git
高光视点44 分钟前
伊萨推出升级版SUPRAREX™ PRO自动化切割设备:更大尺寸、更强结构、更高安全性、更易维护
运维·自动化
b***25111 小时前
深圳比斯特自动化|圆柱电池测试设备核心功能与技术发展解析
运维·自动化
King's King1 小时前
自动化仓库总体设计
运维·自动化
半夏知半秋1 小时前
lua对象池管理工具剖析
服务器·开发语言·后端·学习·lua
Dobby_051 小时前
【Go】C++ 转 Go 第(一)天:环境搭建 Windows + VSCode 远程连接 Linux
linux·运维·c++·vscode·golang