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.
相关推荐
代码方舟4 分钟前
数据科学风控实战:基于天远全能消金报告构建自动化信用评估网关
运维·人工智能·自动化
科力锐品牌君15 分钟前
应用级灾备 | 海量非结构化数据如何实现高效数据保护
linux·运维·网络·安全·系统安全·数据安全·灾备
KaiwuDB19 分钟前
KaiwuDB 运维实战04:DRBD + KaiwuDB——物联网场景下的低成本数据库高可用方案
运维·数据库·物联网·时序数据库·kaiwudb·aiot·多模数据库
zhangrelay26 分钟前
ROS项目设计案例智能大模型正经乱答案例
linux·笔记·学习·ubuntu·机器人
福建佰胜张工1 小时前
A5E00839230西门子工业核心配件详解:参数、安装调试与故障运维全攻略
运维·网络·安全·自动化
流浪0011 小时前
Linux系统篇39——线程(四) pthread库的由来和线程的创建与等待
linux·操作系统·线程·pthread库
Lancker1 小时前
chnroute-linux — 中国大陆 IP 段每日自动更新 + 「仅允许国内访问」落地
linux·运维·tcp/ip
辻弋2011 小时前
【无标题】
大数据·服务器·前端·搜索引擎·开源软件
天远Date Lab2 小时前
零信任架构实战:基于天远全能消金报告(标准版)构建自动化骑手资信评估网关
运维·人工智能·架构·自动化
赛博守夜人2 小时前
反舞弊系列之二十一:数据驱动型反舞弊体系搭建,如何利用ERP与财务数据构建“异常交易自动化风控看板”?
运维·自动化