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.
相关推荐
Android系统攻城狮2 小时前
Linux PipeWire深度解析之pw_factory_create_object调用流程与实战(七十二)
linux·音频进阶·pipewire音频进阶
lsh曙光2 小时前
playbook剧本(2)--Ansible变量
linux·运维·网络
START_GAME2 小时前
MSSQL$SQL2016
java·服务器·前端
lengjingzju2 小时前
编译与调试完全指南—第14章 系统配置与调优
linux
ly76892 小时前
Docker 从入门到实践:镜像、容器、Dockerfile 与 Docker Compose 详解
运维·docker·容器
大鹏的NLP博客3 小时前
通用 Linux 嵌入式板端 C/C++ ABI 与 Glibc 依赖治理规范
linux·c++·交叉编译
用户3169353811833 小时前
ry.bat和ry.sh部署
运维
mennekes3 小时前
自动化产线临时配电:明装工业插座 vs 面板式工业插座 vs 模块化插座箱取舍
运维·科技·安全·制造
tedcloud1233 小时前
book-to-skill 怎么部署?把技术书和项目文档变成 AI Agent 可复用知识
linux·运维·服务器·人工智能·开源
旗开得胜马到成功3 小时前
SK海力士SSD售后翻车:企业备份介质裸奔风险与中科热备技术选型拆解
运维·服务器·网络