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.
相关推荐
AliCloudROS10 分钟前
从 1 万到 20 万:OOS Loop 任务规模提升 20 倍的攻坚记录
运维·性能优化
鱼很腾apoc31 分钟前
【MySQL】第4期 用户管理与 C 语言连接编程详解
linux·服务器·c语言·mysql·connector/c
千桐科技31 分钟前
qModel算法模型平台功能解析:从源码到 Docker 镜像,部署能自动完成哪些工作?
运维·docker·容器·qmodel
刚入门的大一新生1 小时前
Linux-进程间通信1
linux·运维·服务器
天远Date Lab1 小时前
零信任架构实战:基于天远柠檬查维保构建自动化全国连锁二手车置换上架电子维保报告网关
运维·人工智能·架构·自动化
张宇Joaquin1 小时前
Linux系统下磁盘扇区512n、512e和4kn的区别
linux·运维·数据库
道虽迩,不行不至1 小时前
数据库自动连库执行增量脚本-Linux
linux·数据库
GeW1 小时前
新质生产力发展路线图来了,Linux和数据库人该怎么接
linux·数据库
IDCPDU2 小时前
RS485 总线上的 PDU 总丢包:拓扑、终端电阻和地址冲突怎么查
运维
西索斯coding2 小时前
Grok 4.7 调用一直 401 怎么办?不是 Key 过期,是 Authorization 头格式问题——排查全流程 + 修复示例
服务器·开发语言·ai·php