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 分钟前
WebSphere Application Server(WAS)8.5.5教程第五讲
运维·服务器·程序人生·中间件·was·ibm·websphere
黄暄12 分钟前
Linux项目部署全攻略:从环境搭建到前后端部署实战
java·linux·运维·服务器·前端·后端·持续部署
独行soc1 小时前
2025年渗透测试面试题总结-安恒[实习]安全服务工程师(题目+回答)
linux·数据库·安全·web安全·面试·职场和发展·渗透测试
L汐1 小时前
01 CentOS根分区满了扩容
linux·运维·centos
小峰编程1 小时前
Python函数——万字详解
linux·运维·服务器·开发语言·前端·网络·python
大筒木老辈子2 小时前
Linux笔记---内核态与用户态
linux·运维·笔记
厦门辰迈智慧科技有限公司2 小时前
大中型水闸安全监测系统解决方案
运维·服务器·安全
weixin_449568702 小时前
Nginx端口telnet不通排查指南
运维·服务器·nginx
一袋米扛几楼982 小时前
【网络】Wireshark练习3 analyse DNS||ICMP and response message
服务器·网络·wireshark
五花肉村长2 小时前
Linux-进程信号
linux·运维·服务器·开发语言·网络·c++