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.
相关推荐
重生之高冷汉堡包15 分钟前
ChatGPT 如何打造自动化账号:从零搭建到高效运营
运维·chatgpt·自动化
aaa最北边17 分钟前
Linux 上的交叉编译
linux·运维·服务器
蒲公英内测分发28 分钟前
智能门锁量产时,工厂测试 App 一直在更新,产线怎么避免装错 APK?
服务器·人工智能·github·智能硬件·智能手表
垆边人似月.37 分钟前
Python中如何使用get函数实现频次查询
服务器·前端·python
小张成长计划..1 小时前
【Linux】27:日志
linux·运维·服务器
时间售卖铺1 小时前
Nginx 反向代理
运维·nginx·云原生
life码农1 小时前
Nginx location 优先级详解:匹配规则、修饰符与完整代码示例
运维·nginx
别动我齐刘海1 小时前
机器人 C++ / 系统联调补强2——异常处理、Protobuf
linux·c++·人工智能·学习·算法·机器学习·机器人
Lsetea1 小时前
curl -I检查HTTPS返回405:HEAD、GET与证书验收分层排查
linux·http·https·ssl证书·curl
我命由我123451 小时前
Python 开发 - Python 虚拟环境
运维·开发语言·后端·python·http·https·java-ee