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.
相关推荐
chinesegf4 分钟前
现代互联网服务的经典架构
服务器·架构·llama
Rsingstarzengjx12 分钟前
第二十六章 Linux 蜂鸣器实验笔记
linux·驱动开发·笔记·stm32·嵌入式硬件·stm32mp157
wdfk_prog24 分钟前
Docker 29 与 containerd image store:镜像为什么会保存两种形态
运维·docker·容器
Java小学生丶32 分钟前
[开源自荐] ZTShell,一个使用 Tauri 2 + Rust 全程由 AI 开发的跨平台桌面 SSH 工具
linux·网络·centos7·云服务器·开发技巧·资源分享·个人私货
广州灵眸科技有限公司35 分钟前
灵眸科技EAI3572-Core-L核心板即将发布!八核+4TOPS NPU,面向工业与边缘AI
linux·运维·服务器·数据库·yolo
流浪00135 分钟前
Linux系统篇28——通信(五):信号量专篇:从电影院订票到内核一张大表,把信号量一次讲透
linux·运维·服务器
码农小韩41 分钟前
Linux应用开发(三)——Linux的文件属性与目录
linux·嵌入式软件开发·linux操作系统·嵌入式操作系统·linux应用开发
张洛闻Eren1 小时前
云原生k8s【第七课】:集群监控与可观测性
linux·运维·docker·云原生·容器·kubernetes·k8s
1 小时前
Python 图片处理:裁剪缩放至300×200,格式JPG/PNG/GIF,控制大小≤100KB
linux·前端·python