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.
相关推荐
magrich15 分钟前
安装NoMachine并解决无外接显示器桌面黑屏
linux·运维·服务器
fish_xk29 分钟前
Linus基础指令
linux·服务器
L16247643 分钟前
Nginx 6 种发布方式(滚动发布、蓝绿发布(Blue/Green)、金丝雀发布(Canary 灰度)等) 实操全集(配置 + 分步操作 + 回滚)
运维·nginx
宁波阿成1 小时前
在ubuntu22.04源码级安装sub2api
linux·运维·ubuntu·ai·api·token·中转站
charlie1145141911 小时前
嵌入式Linux驱动开发(7) 从虚拟设备到真实硬件 —— LED驱动硬件基础
linux·开发语言·驱动开发·内核·c
Mortalbreeze2 小时前
软件包管理器yum和编辑器vim详解 —— 附带vim配置链接
linux·服务器
李日灐2 小时前
< 7 > Linux 开发工具:git 版本控制器 和 cgdb/gdb 调试器
linux·运维·服务器·开发语言·git·调试器·gdb/cgdb
青木9602 小时前
前后端开发调试运行技巧
linux·服务器·前端·后端·npm·uv
c++之路2 小时前
C++ 模板
linux·开发语言·c++
xcbrand2 小时前
餐饮品牌全案公司哪家可靠
运维·python