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.
相关推荐
PC2005-cloud3 小时前
博文已索引但不展示:一次 Bing SEO 问题排查记录
服务器·人工智能
沸速存储3 小时前
整机瓶颈判断思路,自上而下定位卡顿根源
运维·服务器·电脑·内容运营
奈斯先生Vector4 小时前
告别工具碎片化:基于 Nano Banana 全模态 AI 聚合架构搭建“文本-图像-视频”自动化协同生产线
运维·数据库·人工智能·架构·自动化·aigc·音视频
乌萨奇也要立志学C++4 小时前
【Linux】网络基础 从零理解网络通信:局域网、跨网传输与 Socket 预备知识
linux·服务器·网络
DLYSB_5 小时前
AIOps 大模型实战:基于 LangChain 运维 Agent 的根因诊断与现场声光播报闭环
运维·langchain·报警灯
RisunJan5 小时前
Linux命令-slabtop(实时显示内核 slab 缓存信息)
linux
一可米7 小时前
gitHub.com Actions自动化发布
运维·自动化·github
智塑未来7 小时前
证券公司智能运维平台哪个品牌做得好?擎创科技智能运维 2.0 适配券商全场景
运维·科技·区块链
2601_965798477 小时前
Is Hygia Good for Maid & Janitorial Sites? Technical Audit
服务器·网络·数据库
蚰蜒螟8 小时前
从内核源码看Linux启动:chroot、execve与MS_MOVE的协奏曲
linux·服务器·网络