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 分钟前
Docker-Compose环境配置&使用
运维·docker·容器
异步的告白11 分钟前
链接脚本SECTIONS逐行深度解析
linux·开发语言
南境十里·墨染春水37 分钟前
linux学习进展 信号
linux·服务器·学习
SiYuanFeng1 小时前
一展使用gpt-5-mini和gemini-3.1-flash-image-preview-0.5k的运行demo代码
linux·python·gpt
YuanDaima20481 小时前
堆(优先队列)基础原理与题目说明
linux·运维·服务器·人工智能·python··代码
another heaven1 小时前
【软考 对称加密与非对称加密】
服务器·网络
生万千欢喜心1 小时前
linux 安装 人大金仓数据库
linux·运维·数据库
傻啦嘿哟1 小时前
Python多进程编程:用multiprocessing突破GIL限制
服务器·网络·数据库
Finn Wang1 小时前
KeyPresser 一款自动化按键工具
运维·自动化
@insist1231 小时前
网络工程师-网络规划与设计(三):数据中心机房设计规范全解析
服务器·网络·数据库·网络工程师·软考·软件水平考试