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.
相关推荐
小秋求学记.25 分钟前
Linux_Ubuntu的相关问题
linux·运维·ubuntu
熊猫钓鱼>_>38 分钟前
ArkTS 方舟编程语言 · 原创快速入门教程
运维·架构·ts·harmonyos·arkts·鸿蒙·js
β添砖java1 小时前
黑马Linux笔记
linux·运维·笔记
寒晓星1 小时前
【网络编程】UDP编程
linux·网络·网络协议·udp
在水一缸1 小时前
当 AI 拥有了“核按钮”:深入解析 MCP 服务器与命令执行护栏
运维·服务器·人工智能·命令执行·智能体·ai安全·mcp
froyoisle1 小时前
阿里云免费 SSL 证书申请及配置
服务器·阿里云·ssl·网站
雪的季节1 小时前
【无标题】
linux·服务器·python
爱莉希雅&&&2 小时前
Prometheus高可用(alertmanager+node_exporter+grafana)
运维·服务器·grafana·prometheus
增量星球2 小时前
《持续交付2.0系列六》业务需求协作管理
java·运维·自动化·devops·持续部署·持续集成
YYYing.2 小时前
【C++大型项目之高性能服务器框架 (九) 】协议抽象与Http服务器模块
服务器·c++·http·高性能·c/c++·后端框架