检查 Mac 的屏幕共享服务是否在运行
查看 com.apple.screensharing 服务状态,确认别人能否查看或控制这台 Mac 的屏幕。
运行 `sudo launchctl print system/com.apple.screensharing | head -15`:显示 state: running 表示屏幕共享已开启;报错则说明未运行。
01命令
命令
$ sudo launchctl print system/com.apple.screensharing | head -1502作用说明
屏幕共享允许其他电脑查看甚至控制这台 Mac 的画面,所以守护进程是否真的在运行,比设置里的勾选框更值得确认。如果服务在运行但你从没在"系统设置 > 通用 > 共享"里开启过,就要先弄清楚原因再决定是否关闭。
03风险
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- launchctl — interact with launchd services (macOS man page)依据: Documents `launchctl print <service-target>` which reports the state and details of a specific launchd service.
最后验证: 2026-09-18 · 分类: 安全与隐私