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.
相关推荐
緈福的街口2 分钟前
【leetcode】125.验证回文串
linux·算法·leetcode
Invinciblenuonuo20 分钟前
Linux【5】-----编译和烧写Linux系统镜像(RK3568)
linux·操作系统·rk3568·系统编译
T0uken35 分钟前
【Linux】HAProxy:结合 WG 实现内网 TCP 反代
linux·运维·tcp/ip
鸢时望巧36 分钟前
Shell循环(二)
运维·开发语言
wanhengidc1 小时前
大数据服务器和普通服务器之间的区别
大数据·运维·服务器
网硕互联的小客服1 小时前
如何诊断服务器硬盘故障?出现硬盘故障如何处理比较好?
大数据·运维·服务器
vortex51 小时前
Linux Shell 中的 dash 符号 “-”
linux·运维·服务器
月堂1 小时前
Linux操作系统-性能优化
linux·运维·服务器
鹏说大数据2 小时前
使用Conda管理服务器多版本Python环境的完整指南
服务器·python·conda
fictionist2 小时前
动态 Web 开发技术入门篇
java·服务器·开发语言·笔记·学习·mysql·spring