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.
相关推荐
wd5i8kA8i5 小时前
自研多线程 SSH 极速文件传输助手(附 GitHub 源码)
运维·ssh·github
Boop_wu5 小时前
[Java 算法] 字符串
linux·运维·服务器·数据结构·算法·leetcode
m0_694845576 小时前
Dify部署教程:从AI原型到生产系统的一站式方案
服务器·人工智能·python·数据分析·开源
菱玖7 小时前
SRC常见漏洞情况分类
运维·安全·安全威胁分析
码云数智-大飞7 小时前
C++ RAII机制:资源管理的“自动化”哲学
java·服务器·php
SkyXZ~7 小时前
Jetson有Jtop,Linux有Htop,RDK也有Dtop!
linux·运维·服务器·rdkx5·rdks100·dtop
黑牛儿8 小时前
MySQL 索引实战详解:从创建到优化,彻底解决查询慢问题
服务器·数据库·后端·mysql
舒一笑8 小时前
一次“翻车”的部署,让我看清了技术、权力和职场的真相
运维·程序员·创业
starvapour8 小时前
Ubuntu系统下基于终端的音频相关命令
linux·ubuntu·音视频
杨云龙UP9 小时前
Oracle Data Pump实战:expdp/impdp常用参数与导入导出命令整理_20260406
linux·运维·服务器·数据库·oracle