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.
相关推荐
Maki Winster14 分钟前
在 Ubuntu 下配置 oh-my-posh —— 普通用户 + root 各自使用独立主题(共享可执行)
linux·运维·ubuntu
守望时空3316 分钟前
Linux下KDE桌面创建自定义右键菜单
linux
l0sgAi37 分钟前
vLLM在RTX50系显卡上部署大模型-使用wsl2
linux·人工智能
翻滚吧键盘1 小时前
debian及衍生发行版apt包管理常见操作
运维·debian
ddfa12342 小时前
XML 笔记
xml·服务器
海外空间恒创科技2 小时前
一台香港原生ip站群服务器多少钱?
服务器·网络协议·tcp/ip
Charlene Fung2 小时前
vs code远程自动登录服务器,无需手动输入密码的终极方案(windows版)
运维·服务器·vscode·ssh
麟城Lincoln2 小时前
【RHCSA-Linux考试题目笔记(自用)】servera的题目
linux·笔记·考试·rhcsa
碣石潇湘无限路2 小时前
【部署与总结】从本地运行到公网服务器的全过程
运维·服务器
linux修理工2 小时前
ipmitool 使用简介(ipmitool sel list & ipmitool sensor list)
运维·服务器