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.
相关推荐
小猪佩奇TONY8 小时前
Linux 内核学习(19) --- linux swap 机制
linux·学习·swap·kswapd
长不大的杨瑞杰9 小时前
OpenCode v2 团队治理实战:多仓库 Policy、灰度发布与故障回滚
运维·人工智能·安全·软件工程·devops
开开心心就好9 小时前
本地文件搜索工具,双击Ctrl就能呼出搜索
java·服务器·前端·支持向量机·ffmpeg·音视频·模拟退火算法
第404号工位9 小时前
浏览器的“无痕模式”是当代最大安慰剂?我用 30 行 JS 提取硬件指纹,跨网络换代理照样精准锁定你
linux·人工智能·python
2401_868534789 小时前
英语演讲:麻省理工校长2024年毕业典礼演讲
服务器·网络
ByteCoder.9 小时前
班前十分钟的清单,按体检引导单来写
java·服务器·前端·助播虾
码完就睡10 小时前
Linux——以太网协议
运维·服务器·网络·1024程序员节
心随_风动10 小时前
Ubuntu系统安装Apache服务教程
linux·ubuntu·apache
时间售卖铺10 小时前
MySQL 日志管理
运维·数据库·mysql·云原生
晴天的雨.99210 小时前
【Linux】make & Makefile 核心知识点
linux·运维·服务器