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 分钟前
Prometheus监控Hadoop集群(实操完整版,含避坑指南)
大数据·linux·运维·hadoop·云原生·prometheus
biubiubiu07065 分钟前
Ubuntu命令练习
linux·运维·ubuntu
sbjdhjd8 分钟前
01| 裸机部署 K8S:从零搭建生产可用集群
运维·经验分享·云原生·kubernetes·开源·kubelet·kubeless
曦夜日长9 分钟前
Linux系统篇,开发工具(二):vim的使用与配置
linux·服务器·vim·excel
jran-15 分钟前
Docker 容器化技术&docker安装
运维·docker·容器
呉師傅15 分钟前
将CD音频抓轨转换成MP3的两种方法【图文解释】
运维·服务器·网络·windows·电脑·音视频
iceman195215 分钟前
ubuntu 25.10升级到26.04
linux·服务器·ubuntu
拾光Ծ15 分钟前
【Linux系统】线程(上)
java·linux·运维·jvm·线程·c/c++
轩轩的学习之路20 分钟前
claudecode安装+第三方模型,无root
linux·人工智能·python
金玉满堂@bj20 分钟前
pytest+uiautomation+allure 数据驱动桌面自动化项目搭建指南-yaml版本
运维·自动化·pytest