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.
相关推荐
chao1898441 小时前
完整MES系统实现 (C# 客户端服务器)
服务器·windows·c#
她说彩礼65万2 小时前
C语言 文件
linux·服务器·c语言
txg6662 小时前
自动驾驶领域热点简报(2026-04-26 ~ 2026-05-03)
linux·人工智能·自动驾驶
二哈赛车手2 小时前
新人笔记---ES和kibana启动问题以及一些常用的linux的错误排查方法,以及ES,数据库泄密解决方案[超详细]
java·linux·数据库·spring boot·笔记·elasticsearch
嵌入式×边缘AI:打怪升级日志2 小时前
嵌入式Linux开发核心自测题(全系列精华浓缩)
java·linux·运维
_codemonster2 小时前
系统分析师刷题系列--操作系统(二)
服务器·系统架构
嵌入式×边缘AI:打怪升级日志2 小时前
TinaSDK Linux Kernel 基本使用(全志T113开发板)
linux·运维·服务器
嵌入式×边缘AI:打怪升级日志3 小时前
Linux内核基础完全入门指南(理论篇)
linux·运维·服务器
Muyuan19983 小时前
28.Paper RAG Agent 开发记录:修复 LLM Rerank 的解析、Fallback 与可验证性
linux·人工智能·windows·python·django·fastapi
比昨天多敲两行3 小时前
Linux进程概念
linux·运维·服务器