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.
相关推荐
柳鲲鹏几秒前
RGB转换为NV12,查表式算法
linux·c语言·算法
程序猿(雷霆之王)5 分钟前
Linux——线程安全
linux·运维·服务器
飞雁科技20 分钟前
CRM客户管理系统定制开发:如何精准满足企业需求并提升效率?
大数据·运维·人工智能·devops·驻场开发
wanhengidc21 分钟前
云手机畅玩 梦幻西游
运维·服务器·arm开发·智能手机·自动化
wdfk_prog30 分钟前
[Linux]学习笔记系列 -- [kernel][time]timer
linux·笔记·学习
fy zs35 分钟前
linux下动静态库
linux
佐杰37 分钟前
Jenkins安装部署
运维·servlet·jenkins
熊猫_豆豆38 分钟前
回调函数的作用与举例(Python版)
服务器·python·编程语法
VincentHe1 小时前
当 ServerCat 遇上 Shell 环境变量:一次服务器监控性能优化记录与探索
服务器·shell·监控
深耕AI1 小时前
如何在云服务器上找回并配置宝塔面板:完整指南
运维·服务器