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 天前
基于 Java 的网页聊天室(三)
服务器·前端·数据库
xlp666hub1 天前
深度剖析 Linux Input 子系统(3):从零写一个 Input 驱动,最详细手把手(附完整代码)
linux·面试
贺小涛1 天前
jenkins
运维·jenkins
开开心心_Every1 天前
限时免费加密、隐藏、锁定文件文件夹好工具
运维·服务器·人工智能·edge·pdf·逻辑回归·深度优先
RisunJan1 天前
Linux命令-modprobe(自动处理可载入模块)
linux·运维
野犬寒鸦1 天前
Redis复习记录day1
服务器·开发语言·数据库·redis·缓存
龙俊俊1 天前
服务器模型部署与加载
服务器·人工智能·深度学习
何朴尧1 天前
OpenClaw Linux 完整安装指南
linux
木木em哈哈1 天前
记一次在线编辑器的探索
linux·服务器·网络