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 小时前
裸金属服务器深度解析:适用场景、选型指南与运维实践
服务器·网络·github
Yyyy4823 小时前
Ubuntu安装Jenkis
linux·运维·ubuntu
克莱斯勒ya4 小时前
服务器硬件配置
运维·服务器
GTgiantech4 小时前
精准成本控制与单向通信优化:1X9、SFP单收/单发光模块专业解析
运维·网络
tzhou644524 小时前
Docker容器技术指南
运维·docker·容器
zhuzewennamoamtf4 小时前
Linux SPI设备驱动
android·linux·运维
春日见4 小时前
在虚拟机上面无法正启动机械臂的控制launch文件
linux·运维·服务器·人工智能·驱动开发·ubuntu
松涛和鸣4 小时前
Linux Makefile : From Basic Syntax to Multi-File Project Compilation
linux·运维·服务器·前端·windows·哈希算法
Predestination王瀞潞5 小时前
JDK安装及环境变量配置
java·linux·开发语言
LF3_5 小时前
配置ssh免密登录
运维·ssh