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.
相关推荐
Rabitebla1 小时前
【Linux 底层原理】进程(十):进程等待详解---从僵尸进程到 wait、waitpid 与 status
linux·c++·笔记·学习·visual studio
Decay__1 小时前
18_MySQL 智能巡检方案 —— 巡检项清单 / 一键巡检脚本 / 健康评分
运维·数据库·sql·mysql·架构
天远API6 小时前
零信任架构实战:基于天远运营商三要素详版V即时版构建自动化消费电子大促电商平台高价值权益秒杀与优惠券防羊毛高并发实名核验网关
运维·人工智能·架构·自动化
Android系统攻城狮6 小时前
Linux FFmpeg深度解析之avcodec_default_get_encode_buffer调用流程与实战(二十八)
linux·运维·服务器·ffmpeg·车载音视频·ffmpeg音视频
程序员初一6 小时前
8080 打不开的四层定位:监听地址、ufw、DOCKER 链、安全组
linux·ssh
程序开发阿元6 小时前
swappiness 60 和 10 差在哪:一台 1C1G 的三轮对比
linux·ssh
无足鸟ICT7 小时前
【RHCA+】mpstat命令(监控CPU)
linux
乐维_lwops7 小时前
案例解读:大型综合性科创产业园运维监控落地实践
运维·网络·人工智能·安全·it监控·国产运维智能体
GeW8 小时前
新质生产力Linux和数据库为啥这么关键
linux
番茄啊8 小时前
linux 开启xftp连接
linux·运维·服务器