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.
相关推荐
wuxingge17 分钟前
浪潮服务器-型号NF5270M3做raid
服务器
橘子真甜~18 分钟前
C/C++ Linux网络编程2 - Socket编程与简单UDP服务器客户端
linux·运维·服务器·网络编程api·udp协议·udp通信
咬_咬22 分钟前
C++仿muduo库高并发服务器项目:Poller模块
服务器·开发语言·c++·epoll·muduo
深圳市恒讯科技23 分钟前
服务器与普通个人电脑的主要区别是什么?
运维·服务器
qq_2813174732 分钟前
nginx安装配置、故障处置、性能优化
运维·nginx
未来之窗软件服务1 小时前
服务器运维(十一)SQLite3 php封装——东方仙盟炼气期
运维·服务器·sqlite·服务器运维·数据库驱动·东方仙盟
QT 小鲜肉1 小时前
【QT/C++】Qt样式设置之CSS知识(系统性概括)
linux·开发语言·css·c++·笔记·qt
yachuan_qiao1 小时前
专业的建筑设备监控管理系统选哪家
大数据·运维·python
Elias不吃糖2 小时前
NebulaChat 框架学习笔记:深入理解 Reactor 与多线程同步机制
linux·c++·笔记·多线程
洋哥网络科技2 小时前
centos 7.9搭建安装confluence7
linux·centos·知识图谱