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.
相关推荐
ltl6 小时前
大多数「无锁」代码其实不是无锁的
linux
ltl6 小时前
Linux 内核的内存屏障:一个让我调了三天的 bug
linux
Dontla7 小时前
预置known_hosts如何防止中间人攻击(MITM)?(服务器公钥、服务器私钥)Runner、DNS污染、BGP劫持、同网络ARP欺骗、SSH握手
服务器·网络·ssh
Lonely 净土8 小时前
Rocky Linux 安装教程
linux·运维·服务器
光影少年8 小时前
RN的Fabric 渲染流程
运维·前端·javascript·react native·react.js·fabric
A 糖醋排骨9 小时前
grafana loki alloy轻量级日志采集
运维·grafana·loki
林间码客11 小时前
从DevOps到DevSecOps:构建现代软件交付的基石与护城河
大数据·运维·devsecops·devops
李白你好12 小时前
Windows 离线 Linux 提权辅助查询工具
linux
Lust Dusk12 小时前
记一次Linux应急响应题目解析
linux·运维·服务器·网络·安全·网络安全
ShineWinsu13 小时前
对于Linux:五种IO模型以及非阻塞IO的详细解析
linux·c++·面试·io·阻塞·非阻塞·fcntl