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.
相关推荐
时光の尘10 分钟前
C语言菜鸟入门·关键字·union的用法
运维·服务器·c语言·开发语言·c·printf
davenian20 分钟前
<OS 有关> ubuntu 24 安装 VMware Workstaion
linux·ubuntu·vmware
2201_7611990420 分钟前
nginx动静分离和rewrite重写和https和keepalived
运维·nginx·https
ubuntu180421 分钟前
C0034.在Ubuntu中安装的Qt路径
linux·qt·ubuntu
萧鼎22 分钟前
轻松解析 PDF 文档:深入了解 Python 的 pdfplumber 库
服务器·python·pdf
土豆炒马铃薯。36 分钟前
CUDA,PyTorch,GCC 之间的版本关系
linux·c++·人工智能·pytorch·python·深度学习·opencv
zxn09111 小时前
大数据实战之搭建Linux虚拟机
大数据·linux
wusam1 小时前
CentOS8.5.2111(8)LAMP部署综合实验
linux·运维·服务器
vvw&2 小时前
在 Ubuntu 上部署 MediaWiki 开源维基平台
linux·运维·服务器·ubuntu·开源·wiki·mediawiki
诸葛悠闲2 小时前
《操作系统 - 清华大学》4 -5:非连续内存分配:页表一反向页表
linux·程序人生