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.
相关推荐
flytalei12 分钟前
从YAML到Nginx服务访问:动手理解 Kubernetes Pod、Deployment 与 Service
运维·nginx·kubernetes
白帽攻防录20 分钟前
SRC 挖洞:DHCP 服务器上的四个 UAF,内网原生 RCE 怎么打域管
运维·服务器·网络安全·内网安全
王琦031837 分钟前
jenkins使用手册
运维·jenkins
VidDown1 小时前
用户说“卡顿“,服务器一切正常:播放质量监测与 QoE 指标
运维·服务器·ffmpeg·音视频·视频
暖核1 小时前
从零搭建 Ubuntu24.04 服务器:虚拟机安装 + Netplan 静态 IP+SSH 远程登录
服务器·tcp/ip·ssh
瑞克-桑切斯1 小时前
13、DNS、DHCP 与 FTP 协议详解
linux·运维·云计算
程序员-Benothing1 小时前
Linux性能分析方法论:USE、RED、火焰图与perf实战
linux·运维·服务器
问心无愧05131 小时前
[ACTF2020 新生赛]Exec
运维·服务器·笔记
cg.family1 小时前
K8S:scale 与 delete pod 核心区别
运维·docker·容器
微订校园外卖平台1 小时前
同城外卖跑腿平台需要服务器吗?交付方式、部署架构与上线核对
服务器·架构·github·外卖系统·本地生活·微订