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.
相关推荐
云飞云共享云桌面1 小时前
传统工作站 vs 云飞云共享云桌面:制造业设计云桌面选型深度对比
运维·服务器·前端·网络·3d·架构·制造
JAVA面经实录9172 小时前
操作系统面试题
java·服务器·数据库·计算机网络·面试
小刘|3 小时前
Spring AI Alibaba 集成和风天气 API 实战
java·服务器·前端
暮云星影4 小时前
全志linux开发屏幕适配(一)屏幕参数设置说明
linux·arm开发
Maynor9964 小时前
我用 Codex 给自己的网站上线了一个智能体客服:从 Dify 到服务器部署,全程实战复盘
运维·服务器
聚名网4 小时前
域名net,com,cn有区别吗?有哪些不同呢?
服务器·开发语言·php
java_cj4 小时前
深入kubectl create源码:从YAML到Pod的完整链路拆解
运维·云原生·容器·kubernetes
小小小花儿5 小时前
SSH密钥配置(免密连接远程服务器)
服务器·ssh
swordbob5 小时前
NIO 的 Channel 里有多个 BIO 吗?
linux·网络·nio
深圳恒讯5 小时前
越南服务器BGP多线和单线有什么区别?
运维·服务器