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.
相关推荐
硅基手札8 分钟前
【Linux 内核专栏 17】进程间通信 IPC(上)— 管道·信号·System V IPC·mmap·文件锁
linux·运维·服务器·stm32·单片机·mcu
小能喵8 分钟前
kismet -h 帮助信息 中文版
linux·服务器·网络
seuzhouchenglong10 分钟前
服务器通过本地电脑连接本地开发板
运维·服务器
AR-26710-14 分钟前
Linux Day21——systemctl操作
linux·运维
臻选云栗子24 分钟前
PCDN晚高峰掉量原因分析及优化建议
服务器·网络·安全·网络安全·阿里云·云计算·信息与通信
YumiProxy25 分钟前
流媒体区域内容访问:代理IP的技术原理、检测机制与稳定性优化
服务器·网络·网络协议·tcp/ip·ip
额额额对了34 分钟前
Linux 驱动开发:基于 platform 总线 + misc 设备的 DS18B20 单总线温度驱动
linux·c语言·开发语言·驱动开发·嵌入式硬件
木雷坞1 小时前
Docker Compose部署Metabase:应用库隔离与日期筛选看板
运维·docker·容器
讯捷蓝达1 小时前
台山曙光I620-G20服务器RAID5离线数据恢复全过程
运维·服务器
tedcloud1231 小时前
Docker Compose 部署 Immich:手机照片自动备份与常见故障排查
运维·前端·docker·容器·智能手机·开源·流程图