I recently came across a cool terminal app that help you check your battery health from the command line.
It’s called Battop and it’s open source software written in Rust. I ran into it after I went looking for a GUI battery status tool for Linux similar to CoconutBattery for macOS (it’s a menu-bar app that shows battery health, condition, capacity, temperature, voltage and so on).
A lot of the guides and tutorials that walk through how to check battery info on Linux all agree on one thing: use
upower. It is a solid recommendation. Not only is
upower very detailed but it’s dead easy to use as it’s enabled out-of-the-box in virtually every major Linux distro out there, Ubuntu included.
One downside to using upower is that it’s a little utilitarian. It prints a list and that’s it.
But things can look a lot prettier…
Use Battop to See Battery Status
Battop’s developer describes the tool as “an interactive viewer, similar to
htop and other *top utilities, but about the batteries installed in your notebook.” It’s a fitting description as, with its big, bold, auto-updating graphs, it’s rather reminiscent of them.
Better yet, Battop works with Linux, macOS, and FreeBSD, and it supports multiple batteries — and yes: there are laptops out there that take two batteries.
Battop shows the following information:
- Battery model number
- Battery vendor
- Battery technology
- Cycles count
- Capacity (including original capacity)
- Live graphs for temp/voltage/consumption
Now, you can see these exact same details via
acpitool (minus the graphs). If any information, like battery technology or temperature, isn’t listed in those tools it won’t be listed in this one either.
But the presentation of the information is very engaging. The info is more ordered and scannable. And though it’s superficial, it’s what I like about Battop versus other methods (and the same reason I prefer Btop++, Duf, etc.
While Battop hasn’t been updated since 2019 the most recent release available to download from the project’s GitHub page works without issues on Ubuntu in 2022. You just download the binary for your OS, give it permission to run, and then run it from inside from preferred command line client.
Alternatively, if you’re okay with the inherent issues that could result from installing random things you find online, you can “install” it (i.e. so you can just run
battop to use it) by running:
sudo install battop-* /usr/local/bin/battop
If you’re reading from an Arch-based distro you can install Battop from the AUR by running
yay -S battop.
So that’s Battop: a clean, interactive battery health n’ monitoring tool with a clean, ordered UI and some impressive cross-platform compatibility.
Whether you want to check your battery’s discharge rate, cycle count, view its current capacity versus its original capacity, or — and this is totally not me, btw — just have something cool running on your screen while you eat your croissant in the coffee shop, give it a go!