- Posted on
- • Linux
How to Check Your Laptop Battery Health Using the Command Line in Ubuntu
- Author
-
-
- User
- edan
- Posts by this author
- Posts by this author
-
If you use Ubuntu or a Linux-based OS on your laptop, you probably glance at your battery level from the system tray or settings when needed. But have you ever wondered how healthy your battery actually is? How close is its current capacity to what it was when new? And how many charge cycles has it endured?
Tracking these details can help you anticipate when your laptop’s battery might need replacing, optimize your charging habits, or just satisfy your curiosity.
Fortunately, you don’t need to install any fancy tools or rely solely on graphical utilities. Ubuntu and most Linux distros include command-line tools that give you detailed battery information.
Why Should You Care About Battery Health?
Laptop batteries don’t last forever — each battery cell deteriorates over time, especially if repeatedly charged from empty to full. Usually, batteries are rated for a certain number of charge cycles (one full discharge and recharge counts as one cycle).
Battery health is essentially how much charge capacity your battery holds now versus when it was brand new:
- Energy full = current maximum charge your battery can hold
- Energy full design = original maximum charge your battery came with
- Capacity = current capacity as a percent of design capacity
- Charge cycles = how many full charge/discharge cycles the battery has gone through
Keeping tabs on these stats will tell you if your battery is still good or if it’s losing capacity and approaching end-of-life.
Using upower
to Check Battery Health from the Command Line
Ubuntu’s upower
utility offers a simple way to get this information without any extra installs. It reveals the battery’s vendor, model, current and original capacity, cycle count, time left to empty, and current power draw.
Steps to Retrieve Battery Info Using upower
:
- Open a terminal window.
Type the command:
upower --enumerate
This lists all power-related devices on your system.
Look for the path corresponding to your battery. It usually ends in something like
_BAT0
. Example:/org/freedesktop/UPower/devices/battery_BAT0
- Use this path to request detailed info:
bash upower -i /org/freedesktop/UPower/devices/battery_BAT0
Replace the path with the one from your system.
Understanding the Output
Here’s a snippet of typical relevant info you will see in the output:
energy-full: 38.80 Wh
energy-full-design: 53.90 Wh
cycle-count: 194
capacity: 72%
energy-full
: The current maximum charge in watt-hours (Wh).energy-full-design
: The original maximum charge capacity when the battery was new.cycle-count
: Number of complete charge/discharge cycles.capacity
: Remaining capacity compared to design, shown as a percentage.
For example, if your battery was designed to hold 54 Wh but now only holds 38.8 Wh, it means the battery capacity is about 72%. This battery still retains over two-thirds of its original capacity — not bad if your laptop is a few years old!
Alternative: GUI Tools for Battery Health
If you prefer graphical interfaces, Ubuntu comes with the Power Statistics utility (gnome-power-statistics), which visualizes this data in an easy-to-digest manner showing historical usage, charging habits, and battery details.
However, upower
is convenient, scriptable, and cross-distro compatible — great for terminals, remote machines, or lightweight systems without full desktop utilities installed.
Final Thoughts
Checking your battery health helps you make informed decisions about laptop usage and maintenance. Batteries degrade naturally, but knowing how far along your battery is can help you adjust habits, identify issues, or prepare for replacements before they catch you off guard.
What’s your laptop battery health like? How many cycles have you gone through? Feel free to share your stats or questions!
While many experts suggest keeping battery charge between 10–90% to extend lifespan, opinions vary. Modern devices sometimes include optimized charging features to manage battery longevity.