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.
相关推荐
ShineWinsu5 分钟前
对于Linux:TCPsocket编程基础的解析
linux·网络协议·tcp/ip·面试·笔试·进程·远程指令
dddwjzx13 分钟前
嵌入式Linux C应用编程——tslib库的使用
linux·嵌入式
Huangjin007_14 分钟前
【Linux 系统篇(三)】入门基础指令详解(三)
linux·服务器
言乐616 分钟前
Python实现基本搜索引擎
java·linux·开发语言·python·搜索引擎
酷可达拉斯1 小时前
Linux操作系统-简单内核优化
linux·git·php
码上上班1 小时前
Filebeat课程
linux
weixin_516023071 小时前
LAMMPS(intel)的安装
linux·服务器
代码AC不AC1 小时前
【Linux】Socket编程UDP
linux·udp·socket编程
MMendex2 小时前
Nginx_day4——uWSGI,灰度发布,网站限流限速,Nginx跨域
运维·nginx
小小测试开发2 小时前
RAG检索评测实战:9种架构对比与自动化评估框架搭建
运维·人工智能·python·自动化