用 pmset -g custom 查看 Mac 的睡眠与电源设置
pmset -g custom 会分别列出使用电池和电源适配器时 Mac 实际生效的睡眠与电源参数。
运行 `pmset -g custom`,阅读 Battery Power: 和 AC Power: 两段中的 sleep、displaysleep、disksleep 等数值。
01命令
命令
$ pmset -g custom02作用说明
系统设置只露出其中少数几个选项,而 pmset 能看到全貌,包括 hibernatemode、standbydelay、powernap、网络唤醒等。这些数值单位是分钟,例如 displaysleep 10 表示闲置 10 分钟后熄屏。对比 Battery Power 和 AC Power 两段就能解释“用电池很快睡、插电却一直亮”的现象。之后也可以用 pmset 的 -a/-b/-u 参数修改,但建议先读一遍当前基线再动手。
03风险
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- pmset — power management settings (macOS man page)依据: Documents -g custom, which prints the active power management profile for battery and AC separately.
最后验证: 2026-09-18 · 分类: 系统与设置