在终端里查看 AirPods 电量
用 system_profiler 读取已连接 AirPods 左右耳机和充电盒的剩余电量。
运行 system_profiler SPBluetoothDataType -detailLevel full | grep -A 12 AirPods 即可查看每个耳机的电量百分比。
01命令
命令
$ system_profiler SPBluetoothDataType -detailLevel full | grep -A 12 AirPods02作用说明
AirPods 连接 Mac 后,详细蓝牙报告里带有简略报告中不显示的电量信息。-detailLevel full 参数会列出左耳机、右耳机和充电盒各自的 BatteryPercent 字段。用 grep 过滤可以直接定位到 AirPods 部分,不用翻整份报告。
03风险
!注意: 只有 AirPods 处于连接状态时才会显示电量,充电盒电量可能需要开盖后才会出现;如果设备名不是“AirPods”,请相应调整 grep 关键词。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- system_profiler - report system hardware and software依据: Documents SPBluetoothDataType and the -detailLevel flag for detailed device reports.
最后验证: 2026-09-18 · 分类: 媒体