Linux operating systems utilize the Advanced Configuration and Power Interface (ACPI) daemon to deliver essential battery information. This feature is available in most Linux distributions, ensuring users can easily access battery-related data. The battery information is stored within the /sys filesystem, a location that can be navigated from the command line, or you can use dedicated tools such as acpi and upower.

By accessing the /sys filesystem, or by using command-line tools such as upower or acpi, you can quickly and efficiently view your battery information in Linux.

Step-by-step video guide:

Steps to show detailed battery information in Linux:

  1. Open a terminal application.
  2. Explore the available battery information in the /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. Access specific battery data from relevant files.
    $ cat /sys/class/power_supply/BAT0/capacity
    100
  4. Use the upower tool to view battery details.
    $ 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 the acpi userland application, if not already installed.
    $ sudo apt update && sudo apt install --assume-yes acpi # Ubuntu and Debian
  6. Check battery charge status using acpi.
    $ acpi
    Battery 0: Full, 100%
  7. Access detailed battery information with 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.