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.
相关推荐
Uncertainty!!29 分钟前
Ubuntu 22.04 安装超好用中文输入法rime-ice(雾凇拼音)过程记录
linux·ubuntu·中文输入法
ShineWinsu1 小时前
对于Linux:网络基础的解析
linux·网络·面试·udp·笔试·ip·tcp
Asuicao2 小时前
centos7.9版本升级ssh OpenSSH 9.8p1 源码 OpenSSL 1.1.1w 源码包以及安装升级回滚文档
运维·ssh
耍酷的魔镜2 小时前
谈谈如何使用Netty开发实现高性能的RPC服务器
服务器·网络协议·rpc
志栋智能2 小时前
超自动化安全中的威胁狩猎
运维·安全·自动化
↘"LYong3 小时前
旧版 CentOS 安装 Docker 完整指南(附国内镜像加速)
linux·运维·docker
Zhang~Ling3 小时前
Vim 多模式详解:命令、插入、底行与插件配置
linux·编辑器·vim
Elastic 中国社区官方博客3 小时前
Elastic 在 Everest Group 企业搜索产品 PEAK Matrix® 评估 2026 中被评为领导者
大数据·运维·人工智能·elasticsearch·搜索引擎·ai·全文检索
程序员在囧途3 小时前
likeadmin-api API 中转站怎么做统一报价?从 /pricing、/user/balance 到 task_id 回执的落地方法
运维·服务器·数据库·likeadmin-api·api中转站·token计费
cookies_s_s4 小时前
C++ 字符串动态创建对象 -- 工厂模式、自动注册、模板递归动态调用
服务器·开发语言·c++