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.
相关推荐
G_H_S_3_13 分钟前
【网络运维】Linux:正则表达式
linux·运维·网络·正则表达式
敲上瘾14 分钟前
Linux I/O 多路复用实战:Select/Poll 编程指南
linux·服务器·c语言·c++·select·tcp·poll
huangyuchi.21 分钟前
【Linux系统】匿名管道以及进程池的简单实现
linux·运维·服务器·c++·管道·匿名管道·进程池简单实现
AAA修煤气灶刘哥30 分钟前
手把手教你全流程项目部署:从 Jenkins 到 Nginx 的项目实战手册
java·运维·后端
MrZhangBaby40 分钟前
SQL-leetcode—3374. 首字母大写 II
linux·sql·leetcode
czhc11400756631 小时前
LINUX 820 shell:shift,expect
linux·运维·excel
元清加油1 小时前
【Goland】:协程和通道
服务器·开发语言·后端·网络协议·golang
咕噜签名分发冰淇淋1 小时前
签名应用APP分发平台的微服务化部署是什么?其有哪些优势?
java·运维·微服务
望获linux2 小时前
【实时Linux实战系列】基于实时Linux的物联网系统设计
linux·运维·服务器·chrome·php
进击的阿尔法猿2 小时前
docker
运维·docker·容器