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 小时前
数据库设计Step by Step (10)——范式化
服务器·数据库·oracle
夜雪一千2 小时前
Python enumerate() 函数完整详解:遍历同时获取索引,告别手动计数
服务器·windows·python
donoot2 小时前
Linux系统下图书馆级电子书全自动标准化分类整理完整实施方案
大数据·linux·运维·电子书管理
ITKEY_3 小时前
macOS brew 安装的nginx 文件在哪里?
运维·nginx·macos
Felix-lxd3 小时前
Ubuntu 22.04 配置 Nginx
linux·nginx·ubuntu
Elastic 中国社区官方博客3 小时前
如何比较两个 Elasticsearch 索引并找出缺失的文档
大数据·运维·数据库·elasticsearch·搜索引擎
大E帝国子民14 小时前
MacOS 安装Seismic Unix
服务器·macos·unix
Tim_Van4 小时前
在 CentOS 7 中安装 Chromium 的完整步骤
linux·运维·chrome·centos
德福危险4 小时前
富有想象力的XSS盲打:靶机练习之Tempus_fugit5
服务器·网络·xss
2023自学中4 小时前
C++ 内存追踪器
linux·c++