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.
相关推荐
kaixin_啊啊1 分钟前
PandaWiki 本地 AI 知识库实战:文档导入、智能问答与远程访问
linux·服务器·人工智能·windows·ai
handler019 分钟前
【Linux】进程退出、等待与程序替换
linux·运维·exec·进程·进程等待·进程退出·程序替换
Linux-lucky18 分钟前
33-Linux学习之旅之MySQL用户管理
java·linux·运维·学习·mysql·ubuntu
像风一样的男人@25 分钟前
linux --安装openGL,EGL/OSMesa
linux·运维·服务器
ZzzZZzzzZZZzzzz…35 分钟前
K8s---组件
运维·云原生·容器·kubernetes·k8s·k8s组件
Maynor99637 分钟前
「原子弹爆炸」级别:Astra 复刻游戏合集(含实机截图)
java·linux·运维·数据库·gpt·游戏
陈皮糖..39 分钟前
基于 Kubernetes 与 GitLab CI/CD 的云原生自动化交付平台
运维·ci/cd·云原生·架构·kubernetes·自动化·gitlab
CV艺术家43 分钟前
openssL生成免费的证书
java·linux·服务器
蓝速科技1 小时前
蓝速科技丨多网点涉外窗口翻译机批量部署实战指南
服务器·数据库·人工智能·缓存·语音识别
脚踏实地,坚持不懈!1 小时前
Android 系统工程师(性能/功耗/稳定性)岗位问题深度解析:从内核源码到实战排查(完善版)
android·linux·运维·服务器