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.
相关推荐
其实防守也摸鱼几秒前
CTF Web 6 题全解 Writeup
linux·sql·学习·算法·安全·ctf·xss
zxanz14 分钟前
该怎么去选择 SSL 证书来使用?有什么方法不
服务器·网络协议·ssl
考虑考虑5 分钟前
JFROG手动上传包
运维·后端·自动化运维
qq_401700417 分钟前
CAN 开源库大全(嵌入式/上位机,适配STM32、Linux、Qt,附带Github地址)
linux·stm32·开源
无风听海7 分钟前
深入理解.NET中的 Lazy<T>
服务器·php·.net
Initialize-le17 分钟前
备份显示成功、恢复却失败?四步验证法
运维
GeofferyLibrom21 分钟前
PS5 自动化挂机指南:基于 Mac + Chiaki-ng 视觉识别——龙信2自动挂机实战
运维·macos·自动化
普通人628 分钟前
宝塔中实现按地区过滤和官网跳转伪静态
服务器·开发语言·nginx·1024程序员节
海宇数据29 分钟前
零信任架构实战:基于海宇企业综合风险报告构建自动化供应商资质审查网关
运维·人工智能·架构·自动化
Raas10034 分钟前
AI网关能做调用审计吗?MAI Gateway(魔芋企业级AI网关)实战能力深度解读
java·服务器·网络·数据库·gateway·prompt·企业级产品