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.
相关推荐
有毒的教程9 分钟前
Ubuntu 虚拟机磁盘空间不足完整解决教程
linux·运维·ubuntu
WiChP27 分钟前
【V0.1B5】从零开始的2D游戏引擎开发之路
java·服务器·数据库
geNE GENT1 小时前
Nginx WebSocket 长连接及数据容量配置
运维·websocket·nginx
小樱花的樱花2 小时前
C++ new和delete用法详解
linux·开发语言·c++
APIshop2 小时前
Java获取京东商品详情接口(item_get)实战指南
java·linux·数据库
Cx330❀2 小时前
一文吃透Linux System V共享内存:原理+实操+避坑指南
大数据·linux·运维·服务器·人工智能
薛定谔的悦2 小时前
储能系统(EMS)核心架构解析:充放电控制、防逆流、防过载与 PID 调节
linux·运维·架构
志栋智能3 小时前
超自动化运维的终极目标:让系统自治运行
运维·网络·人工智能·安全·自动化
3GPP仿真实验室3 小时前
【MATLAB源码】CSI-RS:测量链路
linux·网络·matlab
阿 才3 小时前
WSL2 + TFTP + 网络启动(Linux开发板与WSL2建立网络连接)
linux·运维·网络