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.
相关推荐
IT大白鼠11 小时前
彭大帅的AI运维助手第 10 篇——K8s 集群探针升级记:从服务级到业务级
运维·kubernetes·aiops·彭大帅
多弗朗皮卡丘14 小时前
网络基础:数据链路层与其他协议或技术
linux·网络·tcp/ip
考虑考虑17 小时前
nginx拦截url
运维·后端·nginx
速捷工控 PLC触摸屏还原程序18 小时前
欧姆龙NB上传密码忘了,换屏前怎么保留原程序?
运维·服务器·欧姆龙
方便面不加香菜19 小时前
Docker Volume -- 对照总结及综合实战案例操作演示
运维·docker·容器
爱勇宝19 小时前
SSL 证书别再手动续了:acme.sh + Let's Encrypt + 云厂商 DNS 全自动实战
运维·服务器
数据库小学妹20 小时前
数据库容量规划:四个数与扩容触发线
运维·数据库·后端
dingdingfish21 小时前
TLPI 第52章 读书笔记:POSIX Message Queues
linux·mq·ipc·posix·message·tlpi
wacsii21 小时前
【Linux进程(五)】进程控制全解析:从创建、终止、等待到程序替换
linux·服务器