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.
相关推荐
Frank_refuel12 分钟前
分布式IoT数据采集与存储系统(项目复盘)
运维·服务器
wuminyu14 分钟前
stackChunkOop内部结构与GC屏障的配合工作原理剖析
java·linux·c语言·jvm·c++
青衫客3614 分钟前
从网卡到 Socket:再探 Linux 网络协议栈与 iptables 数据包处理流程
linux·网络·网络协议
承渊政道19 分钟前
Linux网络学习【TCP Socket编程实战:connect的断线重连与客户端访问Linux验证】
linux·网络·学习·ubuntu·tcp·socket编程
sunoo-22922 分钟前
嵌入式Linux驱动学习笔记(第3-6天):从misc封装、platform总线到设备树、中断与单总线外设实战
linux·arm开发·驱动开发·笔记·单片机·学习
java_logo30 分钟前
Docker 部署 Portainer CE:轻松搭建容器管理平台
运维·docker·容器·portainer·容器管理·轩辕镜像·portainer-ce
雪落漂泊31 分钟前
Linux基础开发工具(一)软件包管理器与Vim编辑器篇
linux·运维·服务器
崽崽..32 分钟前
【Linux】网络编程的调试工具以及连接失败的具体排查方法
linux·网络
承渊政道32 分钟前
CentOS 7单机部署Elasticsearch 7.17.29:从启动报错、CRUD验证到固定公网地址的完整过程
linux·elasticsearch·centos·内网穿透·cpolar·单机部署
豆豆35 分钟前
2026 年证书寿命 398→200 天:一张到期项台账的字段设计与自动化边界
运维·服务器·cms·网站建设·网站制作·域名·ssl证书