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.
相关推荐
智恒百亿24 分钟前
RTX 5090 全场景技术应用解析:从游戏算力到专业生产力落地
大数据·服务器·游戏
2401_8685347824 分钟前
指令集-最常用 Linux 命令速查手册(整合版)
linux·网络协议
ltl36 分钟前
小文件问题:文件数量如何放大元数据与 I/O 成本
linux
ltl1 小时前
网络延迟优化:Nagle、TCP_NODELAY 与中断亲和
linux
OpenCloudOS1 小时前
从快速响应到问题发现:一次backport挖出全新漏洞CVE-2026-76641
服务器·网络·安全
张文君1 小时前
ubuntu26.04从ext4改成mdadm的raid1+lvm启动
linux·运维·网络
xx~t2 小时前
嵌入式——进程与线程1
linux·c语言·学习·嵌入式·进程与线程
DevHub2 小时前
QEMU + Busybox 搭建嵌入式 Linux 开发环境:内核编译到启动,30 秒一个迭代
linux·运维·服务器
ouynagda2 小时前
Linux 进程管理详解:从概念到实践
linux·运维·网络