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.
相关推荐
布莱克6057 分钟前
Swift 字符串详解:从基础用法到性能与最佳实践
服务器·开发语言·ssh·字符串·swift
新*34 分钟前
Elasticsearch 索引别名入门:创建、路由、原子切换与几个常见误解
运维·后端·elasticsearch·索引别名
时间的拾荒人40 分钟前
Shell 脚本核心语法详解(下篇):流程控制、函数、重定向与文件包含
linux·运维·服务器·bash·脚本编程
饿了吃洗衣凝珠1 小时前
SELinux
服务器·开发语言·php
蜗牛一步步往上爬1 小时前
第四章 更多的bash shell命令
linux·开发语言·bash
分布式存储与RustFS1 小时前
不用 Spark 也能建 Iceberg 表:用 PyIceberg 把表直接落到 RustFS S3 Tables
运维·云原生·开源·对象存储·分布式存储·s3·性能基准
筑梦之人2 小时前
Elasticsearch 9.x 从入门到精通(5/7):集群、分布式与运维
运维·分布式·elasticsearch
进击的荆棘2 小时前
Linux网络——网络基础概念
linux·运维·服务器·网络
tianyuanwo2 小时前
QEMU 虚拟化入门:从“软件模拟一台电脑”到 KVM 时代的基础设施组件
运维·qemu·虚拟化
.YM.Z2 小时前
从操作系统进入Linux进程概念及进程状态
linux·运维·服务器