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.
相关推荐
AI创界者2 分钟前
【网络安全运维】Kali Linux 下 Medusa(美杜莎)工具的高效部署、故障排查与安全测试实战
linux·运维·web安全
FinelyYang26 分钟前
CentOS 7.6 自建 LiveKit 部署指南
linux·运维·centos
Huangjin007_27 分钟前
【Linux 系统篇(十四)】进程 (二) :PCB、task_struct、fork系统调用
linux·运维·服务器
HiDev_29 分钟前
【非标自动化】硬核阅读理解620行梯形图(70~619行)
运维·自动化
深念Y41 分钟前
hotspot-adb-research
linux·数据库·adb·emmc·随身wifi·移动终端
雨田言炎1 小时前
十、QThread多线程
linux·服务器·开发语言·前端·qt
海兰1 小时前
云原生持续交付平台 Zadig 在 Ubuntu 24.04 上的部署及使用指南
linux·ubuntu·云原生
向上的车轮1 小时前
GitHub Actions 自动化运维实战:Java + TypeScript 全栈项目 CI/CD 至阿里云
运维·自动化·github
重庆小透明1 小时前
深入探寻微服务【第三篇微服务的组件】
运维·微服务·架构
哎呦,帅小伙哦1 小时前
Linux 系统监控核心:/proc/stat 文件全解析
linux·服务器