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.
相关推荐
life码农12 分钟前
Linux截取Nginx指定时间段日志的三种方法(grep/awk/sed)
linux·nginx
接口不宕机29 分钟前
外贸公司实战:利用 1688API 自动化监控竞品价格,解决采购定价痛点
运维·自动化
Dawn-bit31 分钟前
Linux网络进阶:TCP三次握手和四次挥手与TCP连接状态
linux·服务器·网络·tcp/ip·云计算·智能路由器
旗开得胜马到成功1 小时前
可信备份技术解析:中科热备如何防范备份数据被攻击
运维·服务器
JavaPub-rodert1 小时前
使用 Docker 部署 Ollama:Docker Compose 一键运行 DeepSeek-R1 1.5B
运维·docker·容器
蓝速科技1 小时前
蓝速科技信创落地:平衡安全合规与项目成本的实战方案
android·运维·人工智能·科技·安全·电脑·鸿蒙
TheBestRucy1 小时前
Python 九阳神功:从零筑基到线程飞升
服务器·开发语言·网络·人工智能·python
NJCloud1 小时前
MooseFS 分布式存储部署与高可用架构实践
linux·运维·分布式·架构
晓晓_za8986681 小时前
Geo 优化源码蒸馏词机制:地域词库构建与匹配逻辑详解
运维·tcp/ip·spring·缓存·ci/cd
mounter6251 小时前
将 RDMA 引入容器:Soft-RoCE (RXE) 网络命名空间支持深度解析
linux·linux kernel·kernel·rdma·net namespace