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.
相关推荐
Archy_Wang_115 小时前
LVS+KeepAlived+Nginx实现企业级业务高可靠部署的实战教程
运维·nginx·lvs
张文君16 小时前
docker使用代理拉取镜像
运维·docker·容器
ltl17 小时前
纠删码原理与存储效率
linux
ltl17 小时前
MinIO 原理和架构:机制、AGPL 与上游 archived 风险
linux
陌路2017 小时前
Docker教程从入门到精通(0基础)
运维·docker·容器
林浩杨_17 小时前
linux搜索命令(grep+sed)
linux·命令模式
W.W.H.18 小时前
将驱动编译成模块并安装到rootfs
linux·物联网·wifi·rootfs·驱动
ltl18 小时前
io_uring 在生产环境翻车实录:内核 bug、资源泄漏和你不知道的限制
linux
ltl18 小时前
内存分配器擂台:jemalloc vs tcmalloc vs mimalloc vs glibc
linux
ltl18 小时前
Zero Copy 的肮脏秘密:在什么时候反而更慢
linux