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.
相关推荐
FlightYe10 分钟前
linux系统编程(二十一):C 语言常见坑
android·linux·运维·服务器·c语言·音视频
by209991 小时前
Linux 文件描述符与重定向
linux·服务器
橙橙笔记1 小时前
Linux基础与命令的学习
linux·运维·服务器·shell
无奈笑天下1 小时前
银河麒麟桌面操作系统【命令行配置文件与图片搜索功能】操作方法
linux·运维·服务器
飞花漫卷,情随岁迁3 小时前
网络数据包转发与内核机制:小白概念科普
linux·运维·网络·数据库·mysql·oracle·智能路由器
.道阻且长.4 小时前
Linux基础IO:理解文件以及回顾C文件接口
linux·运维·服务器·c语言·开发语言·职场和发展
丘山录4 小时前
本地部署 DGX Spark,200G 网卡挂在 4 条通道上
服务器·人工智能·spark·持续部署
学以智用5 小时前
CentOS 目录穿梭
linux
LabVIEW开发6 小时前
5850E 质量流量计 + LabVIEW 流量怎么控?
服务器·网络·labview
goehou6 小时前
改错一行 fstab,SSH 就再也连不上了
linux·运维·故障恢复·fstab