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.
相关推荐
longerxin20201 小时前
nano编辑器插入、编辑完整操作教程(Linux日志/配置专用)
linux·运维·编辑器
cesium vue2 小时前
nginx 流媒体配置
运维·nginx
木心术12 小时前
GitHub Actions自动化运维实战:从CI/CD到全链路DevOps
运维·自动化·github
糯米导航2 小时前
实践教程|搭建电商 AI 无限画布,实现百款商品主图自动化批量生成
运维·人工智能·自动化
朴马丁2 小时前
从制造到智造:PLM如何赋能企业研发创新
大数据·运维·人工智能·食品行业·流程行业plm·化工新材料行业·新能源材料行业
爱小黄3 小时前
使用docker搭建集群-使用 Docker 搭建 KingbaseES 集群
运维·docker·容器
zhougl9963 小时前
Gateway 和 Nginx 路由区别
运维·nginx·gateway
听风3474 小时前
Arch Linux 软件安装完全指南
linux·运维·archlinux·pacman
韩楚风5 小时前
【参天引擎】一次宕机后的数据恢复,让我把 Cantian 持久化与恢复的六大机制全搞明白了
服务器·网络·数据库·分布式·mysql·架构·cantian
沉迷学习 日益消瘦5 小时前
10-Gateway API
运维·kubernetes·gateway