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.
相关推荐
服务器硬件项目经理11 分钟前
超节点修仙录 目 录
服务器·硬件工程·硬件
骇客野人26 分钟前
Linux 全套实操方案(含目录详解、文件传输、日志、文件规范、环境变量、Java 应用部署运维)
java·linux·运维
_菜鸟果果27 分钟前
高德地图 JS API 2.0 在国产 Linux/ARM 电脑上渲染失败 的排查与解决
linux·开发语言·javascript
GeW34 分钟前
飞行汽车交付阿联酋,真正先“起飞”的是低空数据基座——红帽Linux与数据库高可用为什么成了低空运营的隐形跑道
linux
eleven_4u1 小时前
RocketMQ相关问题
java·运维·中间件
0+1111 小时前
Linux --DNS与ICMP
linux·运维·服务器
我命由我123451 小时前
5-1.Python 编码进阶 - 函数进阶(参数、返回值、递归、函数作为参数传递、lambda 匿名函数)
java·服务器·数据库·后端·python·java-ee·python3.11
钛生智能1 小时前
OA 流程定制全参数详解(三):环节信息——流程中最核心、参数最多的部分
运维·办公自动化·oa·协同办公·oa办公系统
bjxiaxueliang1 小时前
一文自建STUN:在Ubuntu上分步搭建STUN服务
linux·运维·ubuntu
高旭的旭2 小时前
图解 Android 系统架构:从 App、Framework、HAL 到 Linux 驱动
android·linux·系统架构