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.
相关推荐
贝锐2 小时前
从国产化信创设备到商用安卓终端,向日葵如何帮助企业实现统一运维管理?
linux·运维·远程控制
Julien20043 小时前
调查和解决 SELinux 问题
linux·运维·服务器·网络·学习方法
天远Date Lab4 小时前
零信任架构实战:基于天远双人婚姻评估查询构建自动化房产按揭联合审查网关
运维·人工智能·架构·自动化
2601_962074685 小时前
自己编译RustDesk,并将自建ID服务器和key信息写入客户端
运维·服务器
小张同学a.6 小时前
Docker 容器实战 1—— docker 基础与镜像构建
linux·运维·docker·容器
大模型丫丫6 小时前
Hermes Agent:轻量级智能体框架实战指南
大数据·运维·服务器
考虑考虑7 小时前
kubectl命令
运维·后端·自动化运维
NJCloud7 小时前
Docker 容器技术入门:部署、核心概念与基础命令
运维·docker·容器
mooooooooooye7 小时前
2026 年跨平台 SSH 客户端怎么选?Xterminal、Termius、MobaXterm 谁更合适
服务器·网络·ssh
2601_962072337 小时前
docker自建rustdesk-server远程桌面
运维·docker·容器