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.
相关推荐
能喵烧香2 小时前
深度解析:Linux 与 Windows 超级权限账户的本质差异
linux·windows
pixcarp2 小时前
知识库系统的内容资产闭环怎么设计
服务器·数据库·后端·golang
江畔柳前堤2 小时前
github实战指南01-账号配置与 SSH 密钥
运维·人工智能·深度学习·ssh·github·pyqt·信号处理
Moshow郑锴4 小时前
Ubuntu 26.04 中文输入法 : fcitx5+Rime中州韵引擎
linux·运维·ubuntu
莫名的好感°5 小时前
手机RAR解压怎么选?2026年二季度四款产品问答
服务器·网络·智能手机
qq_163135755 小时前
Linux 【04-more命令超详细教程】
linux
sevencheng7986 小时前
【ADB】adb命令行常用按键模拟代码
linux·adb·模拟按键,返回键,音量键
暗影天帝6 小时前
BPI-R3 Mini 刷 Yuzhii DHCPD U-Boot 教程
linux
小赖同学啊6 小时前
智能连接器集群化高可用生产方案
linux·运维·人工智能
wanghao6664556 小时前
DevOps 从入门到实践:构建高效交付流水线
运维·devops