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.
相关推荐
JoyCong199824 分钟前
知识科普:ToDesk鸿蒙版高级功能免费开放使用了!
运维·服务器·华为·智能手机·harmonyos·远程工作
yu_zhidun30 分钟前
企业电脑数据防泄密软件选型:内网终端 DLP 落地实战指南
服务器·网络·电脑
cjp5601 小时前
011. UG二次开发,UG管道通讯服务器与wpf客户端通讯
linux·运维·服务器
迪康coolmu1 小时前
企业文档防泄密五层防护实战:基于迪康端点安全一体化管理系统的设计与落地
运维·经验分享·安全
智能运维指南1 小时前
AI加持下的可观测平台与传统平台有什么本质区别?智能告警降噪和根因分析是否可靠?
运维·人工智能·可观测平台·嘉为蓝鲸
上官唐云1 小时前
2024届本科 | C++ Linux服务端开发求职:从嵌入式到底层服务端的技术之路(附开源项目+简历)
linux·c++·开源·求职招聘
就叫飞六吧1 小时前
SSH 本地端口转发:用 localhost 访问远程服务
运维·ssh
Zucker n1 小时前
Ubuntu24.04结合ollama本地使用Hermes
linux·ubuntu
邪修king1 小时前
Linux系统篇(二十三) 基础 IO:从“文件”到“文件描述符”,彻底理解重定向
android·java·linux
snow@li1 小时前
服务器运维:Redis 安装笔记
运维