Lithium-ion batteries naturally degrade over time. If your Linux laptop used to last eight hours on a single charge but now barely survives for two, your battery’s physical capacity has likely deteriorated. While graphical tools exist in desktop environments like GNOME or KDE, the most reliable and universally available method to check your true battery health is through the command line.
Using the upower Command
The upower utility is an abstraction interface for enumerating power devices on Linux. It comes pre-installed on almost every modern distribution.
- Open your terminal emulator.
- First, you need to find the exact system path for your battery. Run this command to list all power devices:
upower -e
- Look for a line that ends with something like
/battery_BAT0or/battery_BAT1. Copy this exact path. - Now, use the
-i(information) flag followed by that path to print a detailed report:upower -i /org/freedesktop/UPower/devices/battery_BAT0
Understanding the Output
The terminal will output a long list of statistics. To determine your battery’s health, look at these three specific lines:
- energy-full-design: This is the absolute maximum capacity (in Watt-hours or Wh) the battery could hold the day it left the factory.
- energy-full: This is the maximum capacity the battery can currently hold when charged to 100%.
- capacity: This is a percentage representing your battery’s health. It is calculated by dividing the
energy-fullby theenergy-full-design.
For example, if the design capacity is 50 Wh, but the current full capacity is only 25 Wh, your capacity percentage will show as 50%. This means your battery has degraded by half and it is time to consider a hardware replacement.
A Simpler Alternative: Using acpi
If you find upower too verbose, you can install a smaller utility called acpi.
Install it on Debian/Ubuntu-based systems using: sudo apt install acpi
Then, simply run:
acpi -i
This command outputs a clean, two-line summary showing your current charge percentage alongside the design capacity degradation percentage.