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.
相关推荐
HackTwoHub16 分钟前
最新Nessus2026.6.8版本主机漏洞扫描/探测工具Windows/Linux
linux·运维·服务器·安全·web安全·网络安全·安全架构
qq_1631357519 分钟前
Linux 【04-mkdir命令超详细教程】
linux
qq_1631357524 分钟前
Linux 【08-mv命令超详细教程】
linux
QWEDDRFTG34 分钟前
C13/C19怎么选?服务器电源线电流与接口选型技巧
服务器
Nayxxu41 分钟前
Gemini + RAG 企业知识库教程:从文档切片到答案生成
运维·人工智能
三雷科技2 小时前
Claude Code 命令行完全指南:从高效交互到自动化工作流
运维·自动化·交互
QWEDDRFTG3 小时前
服务器电源线怎么选?接口、电流、线径、认证一次讲清
服务器
正经教主3 小时前
【docker基础】第五课:Docker网络详解
运维·docker·容器
qq_163135753 小时前
Linux 【07-rm命令超详细教程】
linux
zh路西法4 小时前
【SSH 免密登录全流程】Windows Linux 通用方案
linux·windows·ssh