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.
相关推荐
2023自学中5 小时前
Linux虚拟机 CMakeLists.txt:x86 与 ARM 双架构编译脚本
linux·c语言·c++·嵌入式
土星云SaturnCloud5 小时前
从云端到边缘:基于土星云SE110S的智能视频分析轻量化部署方案(上)
服务器·人工智能·ai·边缘计算
阿狸猿5 小时前
论负载均衡技术在 Web 系统中的应用
运维·前端·负载均衡
Adorable老犀牛5 小时前
靠Claude Code写了登录助手AuthDash:一键自动登录,每天节省10分钟——这才是AI编程的降本增效
运维·ai编程·claudecode
爱就是恒久忍耐6 小时前
老Ubuntu安装podman 5.x版本
linux·ubuntu·podman
梦想的颜色6 小时前
MySQL 查询性能核武器
运维·服务器·数据结构·数据库·mysql
geshifei6 小时前
Sched_ext框架总览
linux·ebpf
CingSyuan6 小时前
服务器RAID阵列与硬盘状态运维指南:RAID级别、降级、踢盘、掉盘、热备盘、重建风险、硬盘指示灯与点灯流程解析
运维·服务器
Dlrb12116 小时前
Linux系统编程-进程及相关指令与函数
linux·进程·并发·进程状态·调度·进程控制指令·进程函数
JP-Destiny6 小时前
docker-安装nacos
运维·docker·容器