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.
相关推荐
烟雨书信9 分钟前
LINUX中Docker Swarm的介绍和使用
java·linux·docker
代码的余温23 分钟前
Linux内核调优实战指南
linux·服务器·数据库
is081538 分钟前
NFS 服务器 使用
服务器·网络
m0_694845571 小时前
教你使用服务器如何搭建数据库
linux·运维·服务器·数据库·云计算
空灵之海2 小时前
Ubuntu Server 22.04.5系统安装教程
linux·运维·ubuntu
gamers2 小时前
rock linux 9 安装mysql 5.7.44
linux·mysql·adb
arbboter2 小时前
【自动化】深入浅出UIAutomationClient:C#桌面自动化实战指南
运维·c#·自动化·inspect·uiautomation·uia·桌面自动化
二进制_博客3 小时前
给CentOS的虚拟机扩容
linux·运维·centos
千钰v3 小时前
Tcpdump: The Basics Tcpdump 基础
linux·运维·网络·tcpdump·tryhackme
kk5793 小时前
【Ubuntu】sudo apt update出现E :仓库***没有Release文件
linux·运维·ubuntu