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.
相关推荐
女王大人万岁14 分钟前
Golang标准库 CGO 介绍与使用指南
服务器·开发语言·后端·golang
宸迪21 分钟前
【python】使用uv管理项目包依赖
linux·python·uv
网云工程师手记1 小时前
DDNS-Go部署与使用体验:动态公网IP远程访问不再断
运维·服务器·网络·网络协议·网络安全
HalvmånEver1 小时前
Linux:基于信号量的环形队列与生产者消费者模型(一)
linux·运维·服务器·信号量
海兰2 小时前
手把手elasticsearch学习增删改查之“增”
运维·jenkins
威桑2 小时前
解决 Qt6 程序 在Linux 环境下无法输入中文的问题
linux·c++·qt
j_xxx404_3 小时前
Linux:文件描述符fd
linux·运维·服务器
未既3 小时前
逻辑卷挂载磁盘操作命令
linux·运维·服务器
那就回到过去3 小时前
拥塞管理和拥塞避免
运维·服务器·网络·网络协议·tcp/ip·ensp
李斯维3 小时前
安装 Arch Linux 到 VMware Workstation 的完全指南
linux