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.
相关推荐
lwx9148522 小时前
Linux-特殊权限SUID,SGID,SBIT
linux·运维·服务器
皮卡狮3 小时前
Linux权限的概念
linux
炘爚4 小时前
深入解析printf缓冲区与fork进程复制机制
linux·运维·算法
workflower4 小时前
注塑机行业目前自动化现状分析
运维·人工智能·语言模型·自动化·集成测试·软件工程·软件需求
小义_5 小时前
随笔 3(Linux)
linux·运维·服务器·云原生·红帽
#六脉神剑5 小时前
MySQL参数调优:十个关键参数助力数据库性能数倍提升
运维·mysql
cccccc语言我来了5 小时前
Linux(10)进程概念
linux·运维·服务器
伐尘5 小时前
【linux】查看空间(内存、磁盘、文件目录、分区)的几个命令
linux·运维·网络
Deitymoon5 小时前
linux——PV操作
linux
倔强的胖蚂蚁6 小时前
x2openEuler 辅助机完整部署教程
运维·云原生