lide (@meeta) 在 macOS 上如何像 systemctl 一样管理后台服务-以 nodepass 内网穿透 SSH 为例 中发帖
家里云 - Mac mini 必备技能
——以 nodepass 内网穿透 SSH 为例
原文链接:https://blog.ibytebox.com/archives/HS9gcfyZ
在 Linux 上,我们习惯用 systemctl 管理服务:
systemctl start xxx
systemctl enable xxx
systemctl status xxx
但在 macOS 上,没有 systemctl。
很多人想手动在 Mac 上跑长期后台服务(内网穿透、代理、守护进程)都会卡在这里
⸻
一、macOS vs Linux:服务管理的本质区别
systemd ≈ launchd
systemctl ≈ launchctl
⸻
二、launchd 的 Agent 和 Daemon
这是 macOS 新手最容易混淆的地方。
1️⃣ LaunchAgent...