用 acpi -b 在终端查看笔记本电池状态
小巧的 acpi 工具可直接在终端打印电池百分比、充放电状态和剩余时间估算。
安装 acpi 包后运行 `acpi -b`,即可显示每块电池的电量与充/放电状态;加 -a 还能查看电源适配器状态。
01命令
命令
$ acpi -b02作用说明
桌面环境把电池信息藏在托盘图标里,而 acpi 命令常因默认未安装而被遗忘。`acpi -b` 读取内核 ACPI 接口,输出类似 "Battery 0: discharging, 62%, 01:14:33 remaining" 的信息。可以组合参数(`acpi -bit`)一次获取电池、温度和适配器状态,或用 `acpi -V` 查看包括风扇在内的全部信息。
03风险
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- acpi(1) - Shows battery status and other ACPI information依据: -b, --battery shows battery information; -a shows AC adapter state; -t shows thermal information.
最后验证: 2026-09-17 · 分类: 系统与设置