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.
相关推荐
毒爪的小新3 分钟前
Linux 环境极速部署 vLLM:从零搭建生产级大模型推理服务
linux·人工智能·ai·语言模型·vllm
鹤落晴春10 分钟前
RH124问答3:从命令行管理文件
linux·运维·服务器
凡人叶枫15 分钟前
Effective C++ 条款30:透彻了解 inlining 的里里外外
linux·开发语言·c++·嵌入式开发·effective c++
guslegend39 分钟前
大模型驱动大数据SRE智能运维
大数据·运维
遇见火星1 小时前
Docker Compose 完全入门:一键启动所有容器
运维·docker·容器·docker compose
火山上的企鹅1 小时前
Codex实战:APP远程升级服务搭建(三)后台管理页面(APK 上传、版本管理、多应用页签)
服务器·网络·数据库·oracle·qgc
Net_Walke1 小时前
【Linux系统】静态链接库与动态链接库
linux·嵌入式硬件
小啊曼1 小时前
CIO实战方法论_11_组织变革打破部门墙
运维
syc78901232 小时前
中文语境下AI编码工具实战对比:从迭代体验看日常开发选择
linux·人工智能·ubuntu
❀搜不到2 小时前
远程服务器codex使用本地cc-switch的deepseek api
运维·服务器