用 upower -i 查看电池详细信息

把 `upower -e` 的结果传给 `upower -i`,可输出完整电池统计:状态、energy-full、容量百分比、电压等。

Linux电源与睡眠systemd电池低风险
运行 `upower -i $(upower -e | grep BAT)` 可打印电池详细数据,包括充放电状态、当前满充容量对比设计容量以及健康度。

01命令

命令
$ upower -i $(upower -e | grep BAT)

02作用说明

upower 与桌面使用的电源管理守护进程通信,通常无需额外安装,且能报告 acpi 没有的字段,如 energy-full(当前)、energy-full-design(设计值)、电压以及可反映电池损耗程度的 capacity 数值。先用 `upower -e` 枚举设备路径,再用 -i 查看详情。grep BAT 用于过滤出电池,跳过电源适配器和鼠标等设备。

03风险

风险低风险
使用条件upower, usually preinstalled on desktop distributions (part of the power-management stack).

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • upower(1) - UPower command line interface
    Ubuntu Manpages · technical · 2026-09-17
    依据: -e, --enumerate lists object paths of power devices; -i, --show-info shows detailed information about an object path.
  • upower(1) manual page
    freedesktop.org UPower · vendor-doc · 2026-09-17
    依据: Documents the -e and -i options for enumerating power devices and dumping their details such as energy, capacity, and state.

最后验证: 2026-09-17 · 分类: 系统与设置

06相关方案