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 小时前
鸿蒙智能体开发实战:23.常见问题
服务器·华为·ai·harmonyos·鸿蒙·智能体
天空'之城7 小时前
Linux 系统编程 22:五种 IO 模型全解
linux
小张成长计划..8 小时前
【Linux】10:冯·诺依曼体系结构和操作系统
linux·运维·服务器
悦儿遥遥雨111 小时前
PXE + Kickstart 无人值守批量部署系统
linux·javascript·nginx
m0_5648768412 小时前
没有公网IP的情况下,怎么进行远程连接两个电脑
服务器·tcp/ip·负载均衡
Imagine Miracle12 小时前
【WSL】让WSL2后台持久运行不自动关闭的解决方案
linux·windows·wsl
兔C12 小时前
Linux 命令行入门学习资料 day_2
linux·运维·服务器
eggcode13 小时前
Linux命令基础与操作技巧
linux
多巴胺梦想家13 小时前
事务与并发控制:当多人同时操作数据库
服务器·数据库·oracle
二宝哥13 小时前
VMware Workstation 实战:CentOS 7.9 安装、桥接网络配置与克隆管理详解
linux·centos·vmware