The ACPI (Advanced Configuration and Power Interface) daemon provides battery information in Linux, installed by default in most Linux distributions. /sys filesystem stores all the battery information monitored by ACPI.

You can view your battery information by viewing the content of the files in the battery section of the /sys filesystem. The filesystem could be hard to navigate, but a few userland applications such as upower and acpi can assist in viewing your battery information.

You can view battery information via /sys filesystem, upower, or acpi in Linux from the terminal.

Step-by-step video guide:

Steps to view detailed battery information in Linux:

  1. Launch a terminal application.
  2. View available battery informations in /sys filesystem.
    $ ls /sys/class/power_supply/BAT0/
    alarm           charge_full_design  device        present        technology          voltage_now
    capacity        charge_now          manufacturer  serial_number  type
    capacity_level  current_now         model_name    status         uevent
    charge_full     cycle_count         power         subsystem      voltage_min_design
  3. View battery informations from any of the files.
    $ cat /sys/class/power_supply/BAT0/capacity
    100
  4. View battery details using upower.
    $ upower -i /org/freedesktop/UPower/devices/battery_BAT0
      native-path:          BAT0
      vendor:               Samsung SDI
      model:                DELL TXF9M6C
      serial:               34075
      power supply:         yes
      updated:              Fri 05 Jul 2019 11:27:48 AM +08 (91 seconds ago)
      has history:          yes
      has statistics:       yes
      battery
        present:             yes
        rechargeable:        yes
        state:               fully-charged
        warning-level:       none
        energy:              54.0968 Wh
        energy-empty:        0 Wh
        energy-full:         54.0968 Wh
        energy-full-design:  61.9932 Wh
        energy-rate:         0 W
        voltage:             8.504 V
        percentage:          100%
        capacity:            87.2625%
        technology:          lithium-polymer
        icon-name:          'battery-full-charged-symbolic'
  5. Install acpi userland application.
    $ sudo apt update && sudo apt install --assume-yes acpi # Ubuntu and Debian

  6. View battery charge information using acpi.
    $ acpi
    Battery 0: Full, 100%
  7. View detailed battery information using acpi.
    $ acpi --battery --details
    Battery 0: Full, 100%
    Battery 0: design capacity 8157 mAh, last full capacity 7118 mAh = 87%
Discuss the article:

Comment anonymously. Login not required.

Share!