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.
相关推荐
无锡银洲自动化17 分钟前
烟气监测取样频繁堵管?防堵取样器解决工业运维通病
运维·产品运营
樂禮19 分钟前
Windows-Arch Linux 键鼠共享 & 剪贴板同步配置
linux·运维·windows
CHANG_THE_WORLD19 分钟前
Linux C 多线程 TCP 并发服务器:从 `accept()` 到工作线程的完整解析
linux·服务器·c语言
影视飓风TIM26 分钟前
Linux基础入门笔记:命令、内核架构与压缩传输全梳理
linux·笔记·架构
敲上瘾29 分钟前
Linux系统调用mmap文件映射与malloc简单模拟实现指南
linux·服务器·c语言·缓存
APItesterCris32 分钟前
电商口碑自动化监控方案:30 分钟搭建商品评论实时采集 + 情感分析系统(完整可运行代码)
大数据·运维·数据仓库·自动化
wdfk_prog8 小时前
嵌入式面试真题第 10 题:高优化等级下共享状态可见性、内存模型与系统级同步设计
java·linux·开发语言·面试·职场和发展·架构·c
x-cmd9 小时前
Mac 涨价后,本地 AI 还能千元入门吗?
linux·人工智能·macos·ai·agent·amd·本地ai入门
Sirius Wu10 小时前
OpenClaw Skill:Matplotlib 可视化技能 + 沙箱双层隔离完整详解
服务器·网络·人工智能·安全·ai·架构·aigc
J-Tony1110 小时前
【Redis】 Redis 是单线程还是多线程
服务器·数据库·mysql