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.
相关推荐
气泡水。32 分钟前
RHCSA笔记实记
linux·笔记
波特率11520032 分钟前
linux当中的六大进程间通信方式
linux·嵌入式·ipc
冠希陈、37 分钟前
Nginx部署SSL,导致多站点串站问题
运维·nginx·ssl
RisunJan44 分钟前
Linux命令-ssh-keyscan(从主机收集公钥)
linux·ssh
こ进制掌控者1 小时前
局域网电脑SMB访问NAS,提示用户名或密码不正确。
运维·服务器
mit6.8241 小时前
devops
运维·flask·devops
云和数据.ChenGuang1 小时前
fastapi项目拆分实战数据模型
java·服务器·数据库·人工智能·深度学习·fastapi·强化学习
向上的车轮1 小时前
GitHub Actions 自动化运维实战:Rust 全栈项目 CI/CD 至华为云
运维·自动化·github
祈禾2 小时前
Redis三大特殊数据类型
运维·服务器·数据库·redis·笔记·缓存
四代水门2 小时前
三、计算机网络
服务器·计算机网络·asp.net