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.
相关推荐
Zhu7584 分钟前
在docker环境部署frp
运维·docker·容器
hhwyqwqhhwy12 分钟前
Ubuntu22.04 安装vitis
linux
运维行者_33 分钟前
企业带宽监控工具实战:网络流量分析与异常排查的5个关键能力
运维·服务器·开发语言·网络·分布式·后端·php
March.s35 分钟前
Nginx 服务器反向代理实战指南
服务器·nginx·github
刚入门的大一新生1 小时前
Linux-Linux第一个系统程序-进度条
linux·运维·服务器
wuminyu1 小时前
JDK21解决虚拟线程IO阻塞原理剖析
java·linux·c语言·jvm·c++
梦想的旅途21 小时前
企业微信自动化实战:客户资料自动修改与备注同步
运维·自动化·企业微信
梦想的旅途21 小时前
企业微信自动化实战:客户通讯录备份与关系自动迁移
运维·自动化·企业微信
茫忙然1 小时前
Linux提权辅助查询工具——BinLens的安装和使用
linux·提权·binlens
FlightYe1 小时前
linux系统编程(八):阻塞与非阻塞IO对比
android·linux·运维·服务器·github·vim