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.
相关推荐
DLYSB_5 小时前
存储运维实战:基于 Ceph Event 监听与 Python 适配器的分布式存储健康度物理声光响应架构
运维·ceph·python·报警灯
爱丶狸5 小时前
Grafana_Zabbix_ImageRenderer_部署与前端操作手册
linux·前端·zabbix·grafana·kylin
阿里云云原生6 小时前
可用性从 99.9% 跃升至 99.995%:畅捷通如何用 AI 重塑运维底座?
运维·网络·人工智能
k4m7v2pz7 小时前
把 Bevy 0.14 游戏移植到 R36S 掌机:一场与“无窗口系统“的搏斗
linux·rust·bevy·r36s·rk3326·开源掌机
阿童木写作7 小时前
Python实现Temu图片批量翻译自动化教程
运维·人工智能·python·自动化
iori97king8 小时前
库存不足自动通知:第一次使用自动化
运维·自动化
@insist1238 小时前
信息系统管理工程师-信息系统运维资源、技术与智能运维核心考点解析
运维·软考·信管·软件水平考试·信息系统管理工程师
木子欢儿8 小时前
Intel 架构的 MacBook Pro 运行 Linux 发热量高解决
linux·运维·服务器
KKKlucifer10 小时前
运营商全域安全运维支撑体系落地实践
运维·安全
EAIReport11 小时前
工业电气自动化数据治理破局:多Agent大模型赋能全景智能决策
大数据·运维·自动化