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.
相关推荐
Java红桃峰峰日拱一卒1 小时前
在jdk8的centos上安装jdk17
linux·jdk17·jdk8
M78佐菲7 小时前
ARM学习笔记(1)
linux·arm开发·笔记·嵌入式硬件·学习
骇客野人7 小时前
Redis 完整安装部署方案(Linux,分【源码编译】+【Docker】两种,推荐生产用源码,测试快速用 Docker)
运维
益达丫8 小时前
Socket编程揭秘:端口、IP与进程通信的底层逻辑
linux·笔记
比兔代理8 小时前
正向代理与反向代理技术辨析,为什么代理 IP 属于正向代理
服务器·网络·http·ip
Wang's Blog10 小时前
Java 接入Redis: 通用命令与键管理
java·服务器·redis
Wang's Blog10 小时前
Java 接入Redis: 列表集合与有序集合操作命令
java·服务器·redis
蓝速科技10 小时前
会议室门牌公告通知发布选型与落地指南丨蓝速科技
大数据·运维·数据库·人工智能·科技
Ivanqhz10 小时前
SVD++算法
java·服务器·网络·深度学习·神经网络
chicheese11 小时前
Linux 面试速查表:从初级到高级,附高频场景答题模板
linux·运维