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.
相关推荐
anxiao_m24 分钟前
园区数字孪生怎么搭建?主流方案与服务商深度对比
大数据·运维·人工智能
时空无限34 分钟前
ubuntu dpkg -l 输出第一列解释
linux·运维·ubuntu
Splashtop高性能远程控制软件44 分钟前
AI 落地的连接基建评估:消费品行业远程连接方案的四个技术维度(性能 / 精度 / 安全 / 统一管理)
运维·人工智能·安全·远程工作·splashtop
ITyunwei09872 小时前
技术管理者视角:AI 重构 ITSM 的四个工程化落点
运维·人工智能
雪碧聊技术2 小时前
使用Docker,将fastApi项目部署到linux服务器
服务器·docker·fastapi·docker部署fastapi
叮咚侠3 小时前
Ubuntu 24.04 安装zabbix-agent 5.0 服务
linux·ubuntu·zabbix·zabbix-agent
故乡dee云3 小时前
华为云国际服务器连不上怎么办?安全组、端口、IP 和网络排查方法
服务器·网络·华为云
佳児素花痴╮3 小时前
服务器模型、网络调试工具、网络协议头分析
服务器·网络·网络协议
666_qq_403882334 小时前
Tabstack 浏览器自动化实战应用指南
运维·自动化