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.
相关推荐
Dlrb12118 分钟前
Linux驱动---Linux 中断系统及其上与下半部的介绍与阻塞IO实现按键检测
linux·嵌入式硬件·imx6ull·中断·阻塞io
mengpp_12345632 分钟前
物联网云平台可以离线使用吗?摒弃云端依赖,工业现场离线自动化解决方案
运维·物联网·自动化·华为云
Acrellea1 小时前
ADL200W/ADL400W 导轨电表:一块小表终结光储防逆流之痛
运维·能源
哎呦,帅小伙哦1 小时前
Linux系统中/proc/diskstats文件字段解析
linux
xiaoxiangsiyan1 小时前
企业网络运维自动化与管理协议深度指南
linux·运维·服务器·网络·学习·自动化
我是小灰灰吖1 小时前
Ubuntu22.04,OpenCV 4.5.5 环境搭建
linux·qt·ubuntu
七仔啊1 小时前
windows server 2022 安装 Linux Docker
linux·windows·docker
風穆1 小时前
多云时代的“服务器比价网”:OopsVPS 实用主义指南
服务器
AIgorithmGEEK1 小时前
Linux 进程控制完全指南:fork、wait、exec 三部曲
linux·运维·多进程·进程创建·进程等待·进程终止·exec家族
wgh6531 小时前
旁挂组网双机热备负载分担
运维·服务器