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.
相关推荐
Rsingstarzengjx28 分钟前
第三十九章 Linux PWM 驱动实验
linux·运维·服务器
SeanQhl1 小时前
BoostKit 环境准备
linux·openeuler·鲲鹏·boostkit·软件源
笔记本note3 小时前
Linux 内存管理
linux·服务器·内存管理
郝学胜-神的一滴3 小时前
Effective STL 条款 14:用扩容函数避免重新分配
linux·开发语言·网络·数据结构·c++·单片机
GeW4 小时前
入行 Linux 与数据库运维:一条路径、三项习惯、一个考证观
linux·数据库
南子北游6 小时前
Linux 进程状态全景(上)
linux·运维·服务器
wdfk_prog6 小时前
Wi-Fi Direct 真机实践:JOIN 建链耗时优化
服务器·asp.net·php
yyzc111117 小时前
AI聚合支付搭配数字门店系统让实体店告别粗放经营
大数据·运维·人工智能
分布式存储与RustFS8 小时前
浏览器调 RustFS 的 S3 接口被拦下来?两个 CORS 变量分开管 9000 和 9001
运维·云原生·开源·对象存储·分布式存储·s3·性能基准
吴建旭 智宅焕8 小时前
智能家居全国交付中兜底型基础设施的三大能力架构设计与实现
运维·智能家居·devops