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.
相关推荐
南烟斋..17 分钟前
GDB调试核心指南
linux·服务器
爱跑马的程序员36 分钟前
Linux 如何查看文件夹的大小(du、df、ls、find)
linux·运维·ubuntu
代码AI弗森2 小时前
n8n 专题:从“自动化脚本”到“可视化工作流引擎”(自建、节点、Webhook、生产部署)
运维·自动化
像风一样自由3 小时前
android native 中的函数动态注册方式总结
android·java·服务器·安卓逆向分析·native函数动态注册·.so文件分析
oMcLin3 小时前
如何在 Ubuntu 22.04 LTS 上部署并优化 Magento 电商平台,提升高并发请求的响应速度与稳定性?
linux·运维·ubuntu
Qinti_mm3 小时前
Linux io_uring:高性能异步I/O革命
linux·i/o·io_uring
优雅的38度3 小时前
linux环境下,使用docker安装apache kafka (docker-compose)
linux·架构
小李独爱秋3 小时前
计算机网络经典问题透视:TLS协议工作过程全景解析
运维·服务器·开发语言·网络协议·计算机网络·php
想唱rap4 小时前
表的约束条件
linux·数据库·mysql·ubuntu·bash
山上三树4 小时前
对比用户态线程与内核态轻量级进程
linux