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.
相关推荐
智塑未来1 分钟前
鸿蒙系统小红书隐私保护——应用锁开启指南
服务器·前端·harmonyos
Shadow(⊙o⊙)9 分钟前
Linux网络部分——基于UDP的四大接口,实例应用,常考汇总,完整服务端、客户端设计流程+代码
linux·网络·udp
深念Y17 分钟前
老Flyme 官方 root 开启 ADB TCP 方案
linux·数据库·网络协议·tcp/ip·adb·智能手机·emmc
小此方1 小时前
Re:Linux系统篇(五十二)线程篇 · 五:直击 Linux 内核底层:TCB 与 LWP 一体两面全解析(附自定义线程封装)
linux·运维·驱动开发
ltl9 小时前
校验和与数据完整性:CRC32C、xxHash 与端到端校验
linux
我是小灰灰吖9 小时前
Ubuntu 22.04 设置 CPU 性能模式:提升系统响应速度
linux·ubuntu
ltl9 小时前
持续性能分析:Parca、Pyroscope、Grafana Beyla
linux
ltl9 小时前
Direct I/O 与 O_DIRECT:绕过缓存的得与失
linux
盐焗鹌鹑蛋11 小时前
【Linux】进程控制
linux
微三云 - 廖会灵 (私域系统开发)11 小时前
抖店 OPC 自动化运营系统架构与商业代理分控体系完整解析
运维·系统架构·自动化