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环境准备完全指南
linux·运维
布莱克6051 小时前
Swift 闭包详解:从语法到实战的完整指南
服务器·开发语言·ios·ssh·swift·闭包
努力写代码的熊大2 小时前
Linux 个人复盘博客 · 第六篇 Linux 进程间五种通信:匿名管道、命名管道、共享内存、消息队列与信号量
linux·经验分享·笔记
橙橙子2302 小时前
Linux----libevent
linux·运维·服务器
不积跬步无以至千里mmbb262 小时前
Rust内核开发核心入口解析
linux·rust
如夏倾城3 小时前
五大远程桌面协议:RDP、SSH、VNC/RFB、Citrix ICA/HDX 与 VMware Blast Extreme
运维·windows·网络协议·安全·自动化·ssh·远程工作
无足鸟ICT4 小时前
【RHCA+】numactl命令(管理numa)
linux·运维·服务器
飞奔的瓜牛5 小时前
CentOS 7 系统优化实战指南:从内核参数到服务精简
linux·运维·centos
少司府15 小时前
嵌入式外设篇(二)GPIO·二:GPIO输出与LED控制
linux·stm32·单片机·嵌入式硬件·mcu·51单片机·系统
H.莓飛16 小时前
【C++】【STL】stack_OJ题
服务器·c语言·开发语言·数据结构·c++·算法·visual studio