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.
相关推荐
吠品7 小时前
处理 Python 类继承中那些变来变去的初始化参数
linux·前端·python
会Tk矩阵群控的小木7 小时前
小红书矩阵软件:基于Python+ADB的多设备批量管理自动化脚本实战
运维·python·adb·矩阵·自动化·新媒体运营·个人开发
NetInside_7 小时前
某市级水利单位全流量监测与可视化交付实践
运维·网络
ai_coder_ai7 小时前
使用ocr实现自动化脚本
运维·自动化·ocr
帅大大的架构之路7 小时前
linux上面的一些小知识点
linux·运维·服务器
光电笑映7 小时前
进程间通信:深入 System V IPC:共享内存、消息队列与信号量
linux·运维·服务器·c++
RisunJan7 小时前
Linux命令-patch (为开放源代码软件安装补丁程序)
linux·服务器·算法
皆圥忈7 小时前
_Linux文件系统与磁盘结构深度解析
linux
向日葵.7 小时前
linux & qnx & git 命令 2
linux·运维·git
丑过三八线7 小时前
Systemd Cgroup 驱动详解
linux·ubuntu·容器