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.
相关推荐
2601_9498477518 分钟前
bcrypt.js 跨端三方库仓颉适配全流程
linux·运维·ubuntu
m0_6399069418 分钟前
Linux 操作系统入门:目录结构、服务排查常用命令、Shell 脚本基础
linux·运维·后端
今天重构了吗1 小时前
Linux 上 rm -rf 删错了能找回吗
运维·服务器
KaiwuDB1 小时前
KaiwuDB 分布式集群扩缩容,从原理到完整操作踩坑总结
运维·数据库·分布式
codezzzsleep2 小时前
学术汇报 PPT 自动化生成实战指南
运维·自动化·powerpoint
古法老登瞎折腾2 小时前
大数据智能运维实战(九):让 AI 查日志——找到异常,也保留上下文
java·大数据·运维·人工智能·spring ai·mcp
Smoothcloud润云2 小时前
GPU远程纳管安全吗?最小权限、网络边界与日志审计实战
服务器·网络·人工智能·安全·gpu算力·gpu
ai大模型-探索者2 小时前
Function Call与MCP(区别、联系与实战)
java·服务器·网络
略略略咯咯2 小时前
啊啊啊啊啊
java·服务器·数据库
水饺编程2 小时前
第2章:Linux 基础,exit 命令
linux·c语言·汇编