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.
相关推荐
ziguo11223 小时前
深入浅出 C/C++ 数据类型:从入门到踩坑
linux·c语言·c++·windows·visual studio
无垠的广袤3 小时前
【工业树莓派 CM0 Dev Board】扩展板设计
linux·python·嵌入式硬件·pcb设计·模块化·传感器
会编程的土豆3 小时前
MySQL 入门:库、表、行、主键是什么
linux·数据库·网络协议·http
△曉風殘月〆4 小时前
如何在Linux中安装Qt开发环境
linux·运维·qt
不会就选b5 小时前
Linux之文件--fd,重定向
linux
三十岁老牛再出发5 小时前
07.26每日总结
linux·c语言·mysql
爱写代码的阿森6 小时前
鸿蒙三方库 | harmony-utils之RegexUtil正则匹配验证详解
服务器·华为·harmonyos·鸿蒙·huawei
fengyehongWorld6 小时前
Linux update-alternatives命令
linux
雨的旋律20996 小时前
ubuntu2604
linux·运维·服务器
Eloudy6 小时前
ubuntu 22.04安装 cuda 12.8.2
linux·运维·ubuntu