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.
相关推荐
云达闲人3 分钟前
搭建DevOps企业级仿真实验环境:012容器运行时 containerd 详解
运维·kubernetes·containerd·devops·proxmox ve·容器运行时·容器部署
189228048615 分钟前
NV301固态MT29F32T08GWLBHD6-QJES:B
大数据·服务器·人工智能·科技·缓存
实心儿儿7 分钟前
Linux —— 进程间通信 - system V进程间通信 - 共享内存(2)
linux·服务器
烛衔溟16 分钟前
TypeScript 类实现接口
linux·ubuntu·typescript
小则又沐风a18 分钟前
深入了解进程概念 第二章
java·linux·服务器·前端
CCPC不拿奖不改名18 分钟前
PostgreSQL数据库部署linux服务器流程
linux·服务器·数据库·windows·python·docker·postgresql
MXsoft61820 分钟前
**运维标准化建设:让杂乱无章的工作变成可复制****流程**
运维
lzh2004091922 分钟前
手搓一个简易 Linux 进程池:巩固进程知识
linux·c++
ZC跨境爬虫23 分钟前
跟着 MDN 学 HTML day_60:(表单与按钮技能测试实战)
服务器·前端·javascript·数据库·ui·html
xiaoye-duck28 分钟前
《Linux系统编程》Linux基础开发工具 (一):软件包管理器yum/apt,编辑器Vim,编译器GCC/G++
linux