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.
相关推荐
心之王者7163 小时前
【Linux】多线程:从线程控制、同步互斥到经典并发模型
linux·运维·服务器
Doctor_Strange_DML4 小时前
图像编辑模型服务部署过程记录
linux·缓存·docker·ai
Decay__5 小时前
PostgreSQL 运维自动化平台 —— 部署编排、监控、巡检、告警、工单闭环一体化
运维·数据库·sql·mysql·架构
java_logo5 小时前
Docker 部署 Vaultwarden:轻松搭建私有化密码管理平台
运维·docker·容器·私有化部署·密码管理·轩辕镜像·密码管理软件
数字新视界8 小时前
信创动环监控实现机房能耗可视化与用电异常预警
服务器·数据中心·机房·环境管理·环控系统
笔记本note8 小时前
Linux 文件系统与设备文件
linux·服务器·文件系统
无足鸟ICT8 小时前
【RHCA+】_proc_pid_cmdline
linux·运维·服务器
学以智用9 小时前
CentOS Linux 文件操作详解
linux
饿了吃洗衣凝珠10 小时前
shell循环
linux·运维·服务器
代码不停11 小时前
Linux基础知识
java·linux·数据库