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.
相关推荐
一个有温度的技术博主7 分钟前
Linux 核心命令速查指南:从文件操作到系统运维
linux·服务器
小小的木头人26 分钟前
Docker 环境下迁移 containerd 数据目录:从 `/var/lib/containerd` 到 `/data/containerd`
linux·docker
天远数科1 小时前
零信任架构实战:基于天远全能消金报告构建自动化信贷评估网关
运维·人工智能·架构·自动化
东城居士1 小时前
验证第一个Linux字符驱动程序
linux·嵌入式系统
Winner_hwx2 小时前
华为ICT大赛备赛复习1
服务器·网络·华为
宗介波妞2 小时前
Wireshark 抓取 IEC104 报文:常见异常报文排查与标志位解读
服务器·网络·wireshark
网硕互联的小客服3 小时前
各个版本的Linux系统如何修改远程端口ssh端口?
linux·运维·服务器·网络
T1mzhou4 小时前
ARM64 Linux 6.10 内核驱动(12):dd.c:probe/ remove、延迟 probe
linux·服务器·c语言·arm开发·arm
Mr小林5 小时前
Docker 安装教程(在线 + 离线)
运维·docker·容器
JudithHuang6 小时前
把本地服务暴露到公网
运维