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.
相关推荐
大耳朵-小飞象4 小时前
智能调光4巨头争霸!轨道照明如何破局?
运维·智慧城市·智慧路灯·智能照明·楼宇智控·0-10v调光模块
sanzk4 小时前
firefly开发板ubuntu安装ros2下的micro-ROS Agent
linux·运维·ubuntu
努力进修6 小时前
Docker+cpolar 实战:打造灵活可控的远程办公系统
运维·docker·容器
其实防守也摸鱼6 小时前
运维--怎么看接口的请求和返回
运维·学习·网络安全·网络攻击模型·burpsuite·攻防对抗·蓝队
weixin_307779137 小时前
Linux下Nginx故障系统化检查Shell脚本
linux·运维·服务器·nginx·自动化
skyutuzz8 小时前
node安装部署
linux
一次旅行8 小时前
【AI工具】Rust-Based CLI:用 xargs 和并行加速你的 Linux 日常
linux·开发语言·rust
山峰哥9 小时前
数据库工程与索引策略实战指南‌
服务器·数据库·sql·oracle·深度优先
jieyucx9 小时前
Docker 入门第一阶段:建立正确认知与初体验
运维·docker·容器
2501_9259633811 小时前
Hi3516CV610 + MPU6050 DMP 软件 EIS 防抖笔记
linux·运维·服务器