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.
相关推荐
APItesterCris2 小时前
实战教程:借助 Open Claw + 淘宝商品 API,低成本实现电商自动化监控与智能选品
大数据·运维·自动化
三千里3 小时前
ZSH的简单配置
linux·zsh·terminal
Jinkxs3 小时前
Python基础 - 文件的写入操作 write与writelines方法
android·服务器·python
提伯斯6463 小时前
解决Fast-Drone-250编译相关错误
linux·ros·无人机·fast-drone
liulilittle3 小时前
过冲:拥塞控制的呼吸与盲行
linux·网络·c++·tcp/ip·计算机网络·tcp·通信
风曦Kisaki4 小时前
# 自动化运维Day03:Ansible模块进阶(setup,debug),四种常用变量,进阶语法;Ansible Roles(角色)
运维·自动化·ansible
无足鸟ICT4 小时前
【RHCA+】三种工作模式
linux
兮动人4 小时前
服务器流量监控与性能优化实战
服务器·网络·性能优化·服务器流量监控与性能优化实战
Dlrb12114 小时前
Linux系统编程-会话、守护进程与系统日志
linux·守护进程·会话·进程组·系统日志
赵民勇4 小时前
Linux strings命令详解
linux·运维