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 小时前
Linux 系统 MySQL 完整安装配置教程:从卸载 MariaDB 到优化 my.cnf----《Hello MySQL!》(1)
android·linux·c语言·c++·mysql·leetcode·mariadb
赵文宇(温玉)2 小时前
OpenEuler24.03 SP4 系统安装(欧拉/麒麟V10)
linux·openeuler·欧拉
2601_966799042 小时前
酷嗨米J300:一台相机同步推三平台
运维·服务器·负载均衡
AI行业说3 小时前
2026年清洁耗材智能模板机品牌排名:扫地机拖布、美妆粉扑工厂自动化选型指南
运维·自动化
派大鑫wink3 小时前
Dify 工作流搭建操作手册:以信息化运维周报自动生成为例
运维
志栋智能3 小时前
超自动化运维:支持微服务架构的运维模式
运维·架构·自动化
Bamtone20253 小时前
Bamtone班通:TDR阻抗测试仪如何高效助力AI服务器高速信号完整性验证?
服务器·人工智能·阻抗测试·阻抗分析
资深电气设计3 小时前
技术分析:空调机房水泵性能优势与系统适配性研究——水力能效、结构集成与智能运维维度
大数据·运维
Brilliantwxx4 小时前
【Linux】 进程(7)深度剖析 进程内核O(1)调度队列 + 饥饿问题
linux·运维·服务器
疯狂打码的少年4 小时前
【数据库技术】关系完整性约束(实体/参照/用户定义)
运维·服务器·数据库·笔记