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.
相关推荐
2401_826097622 小时前
JavaEE-Linux环境部署
java·linux·java-ee
(:满天星:)3 小时前
第31篇:块设备与字符设备管理深度解析(基于OpenEuler 24.03)
linux·运维·服务器·网络·centos
小陶来咯3 小时前
【仿muduo库实现并发服务器】Acceptor模块
运维·服务器
爱莉希雅&&&3 小时前
shell编程之awk命令详解
linux·服务器·git
笑稀了的野生俊3 小时前
在服务器中下载 HuggingFace 模型:终极指南
linux·服务器·python·bash·gpu算力
cui_hao_nan3 小时前
Docker后端部署
运维·docker·容器
渡我白衣4 小时前
Linux操作系统之文件(四):文件系统(上)
linux
ZZH1120KQ4 小时前
Linux系统安全及应用
linux·运维·系统安全
程序漫游人4 小时前
centos8.5安装jdk21详细安装教程
java·linux
小扎仙森4 小时前
关于服务器宝塔转移wordperss子比主题问题
运维·服务器