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.
相关推荐
Tronlong创龙36 分钟前
【RK3572 开发板】Linux 系统定制实战:rootfs 改造、整包重打包与分区扩容(中)
linux·嵌入式开发·硬件开发·工业控制
fly-3352 小时前
快速重传与快速恢复:TCP丢包的高效应对
服务器·网络·tcp/ip
stormsha5 小时前
中文路径让 MySQL 起不来:Failed to find valid data directory 与 Illegal byte sequence
运维·数据库·mysql
stormsha5 小时前
MySQL 报 `data directory has files in it`:初始化失败一次,之后就永久起不来
运维·数据库·mysql
星恒随风7 小时前
从0实现C++ AI大模型接入SDK(七):Ollama本地模型部署、NDJSON流式响应与LLMManager模型管理
linux·开发语言·c++·人工智能·笔记
数字新视界8 小时前
机房动环监控验收重点与常见不合格项整改建议
服务器·数据中心·机房·环境管理·环控系统
蜗牛一步步往上爬8 小时前
第十七章 创建函数
linux
深频率8 小时前
补丁还在排队,AI先替服务器挡了一刀
服务器·人工智能·jenkins
3095566669 小时前
股票接口日期参数为什么不起作用:五组请求对照与逐字节比对排查笔记
服务器·数据库·笔记·python·量化·api接口·股票接口
沙老师10 小时前
Linux Purification Plan - More Modification
linux·运维·服务器