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.
相关推荐
酣大智32 分钟前
网络协议计时器 & 发包间隔汇总
运维·网络·tcp/ip
Wang's Blog6 小时前
Java 接入Redis: 服务启动停止与后台运行配置
java·服务器·redis
云运维笔记7 小时前
IP地址从入门到精通:网络通信的核心基石
运维·网络·计算机网络
bosins7 小时前
WSL2 启动即崩溃?调整超时参数解决 Docker 阻塞问题
linux·docker·wsl
web守墓人8 小时前
【goed/ui】自定义组件设计思想篇
linux·windows·ui·golang
码农学院8 小时前
企业官网改版后 AI 引用归零的复盘:301 重定向断层让爬虫索引掉线,修复方案与恢复数据
运维·geo优化·ai优化aio
kuroomi8 小时前
Ingress-Nginx与kubernetes 网络
linux·运维·网络·kubernetes
当下新鲜事8 小时前
空调机房冷冻泵与冷却泵技术分析:赛莱默B&G背包式智能变频管道泵的工程应用
运维·物联网·业界资讯
EasyGBS8 小时前
终结训推割裂!EasyGBS×EasyAIS×DLTM,实现AI算法训推一体闭环落地!
服务器·深度学习·安全
daemon.qiang9 小时前
国内虚拟机对接 Freedesktop:Fork xserver、自建 Runner 与提交 MR 实战
linux·ubuntu·centos·gitlab·开源软件