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.
相关推荐
@atweiwei3 小时前
LangChainRust 0.33.0 发布:让 Agent 应用更容易运行、观察和评测
服务器·前端·javascript
工业一体机老司机4 小时前
rsync+inotify 收集车间工位机日志的完整配置
服务器·数据库·postgresql
西柚小萌新4 小时前
【人工智能:LangGraph】--3.控制流(Edge)
java·服务器·数据库
胜心缘4 小时前
openEuler 24.03 最小安装后的第一个小时:10 组命令,一份基线清单
linux·运维
胜心缘4 小时前
openEuler 装 nginx:别再开 EPOL 了,它根本不在里面
linux·运维
用户8174480063394 小时前
从零搭建并加固个人博客:阿里云轻量服务器 + Hexo + Nginx 全流程实战
linux
飞奔的瓜牛5 小时前
Nginx + HAProxy 实现 TCP 代理:架构设计与实战配置
运维·tcp/ip·nginx
蝶依斓(湖南)全案整装5 小时前
整装企业内容中的施工进度表述:节点、周期、反馈机制怎么写
运维
xixiaoyunya5 小时前
FTP 文件备份的替代思路:用点对点自动化工具降低部署和维护成本
运维·备份
老一岁6 小时前
Redis事务_锁_持久化_主从哨兵
linux·数据库·redis