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.
相关推荐
运维栈记1 小时前
API Error: 400 Request body format invalid
linux·ai
志栋智能1 小时前
小步快跑:从单一场景开启超自动化巡检之旅
运维·网络·人工智能·自动化
AugustRed1 小时前
Linux 运维常用命令大全(超全速查表)
运维·网络·php
小白兔奶糖ovo1 小时前
【Leetcode】231. 2的幂
linux·算法·leetcode
weixin_394758032 小时前
CRMEB 会员电商系统PRO系统安装之宝塔安装教程-新手推荐(软件管理)
服务器·阿里云
Plastic garden2 小时前
Docker(1)
运维·docker·容器
s_w.h2 小时前
【 linux 】动静态库的制作
linux·运维·服务器·算法·bash
songjxin2 小时前
Nginx 日志分析可视化面板
运维·nginx
专注VB编程开发20年2 小时前
安卓APP与服务器通讯技术,文件传输和文字消息收发
运维·服务器
顺风尿一寸2 小时前
深入Linux内核:mkdir系统调用的完整实现解析
linux