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.
相关推荐
2301_801184752 小时前
linux系统注意知识
linux·运维·服务器
程序猿追4 小时前
换场倒计时的暂停、重置与到点回调在 HarmonyOS 7 上怎么处理
运维·服务器·数据库·harmonyos
盗理者4 小时前
麒麟 V10 上把 MCP Server 挂到 Nginx 后面:421 与流式断流的排查
linux·网络·nginx·信创·mcp
小豆庄5 小时前
自动化内容分发的架构选型:自建脚本、外包还是工具平台?
运维·容器·架构·自动化·go·需求分析
天远API5 小时前
零信任架构实战:基于天远车辆过户详版查询构建自动化二手车残值估值网关
运维·人工智能·架构·自动化
迈威通信5 小时前
MICF600S-2F工业CAN光纤转换器技术解析:光纤远传、环网自愈与云边协议互通
运维·网络·架构·信息与通信
EmbeddedChen8 小时前
Linux Shell 脚本入门:写一个自动备份文件的小工具
linux·bash·shell
志栋智能8 小时前
超自动化安全的报告自动生成与分发
运维·安全·自动化
智购科技无人售货机工厂店8 小时前
自动售货机刷脸支付集成实战:活体检测与合规门槛~YH
java·服务器·前端·科技·零售
开开心心就好10 小时前
定时结束进程的小工具,到点还能关机
linux·运维·服务器·智能手机·pdf·电脑·word