Your laptop and smartphone’s “battery” is what has given them the status of being portable. This is how much important a battery, its capacity, and its heath is. A battery, when new, is able to run for longer hours but as years pass by, your battery starts providing lesser juice. Therefore, time and again, we should keep checking out laptop’s battery report to know when is it time to get a new one.

In this article, we will explain how to view your laptop’s battery report through:

  • The Ubuntu graphical user interface
  • The Ubuntu command line

We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system.

View Battery Report from the Ubuntu UI

The Gnome Power Statistics tool can show historical and current battery information and programs waking up that used power. You probably only need to install this application if you are having problems with your laptop battery, or are trying to work out what programs are using significant amounts of power.

You can use the following command in your Ubuntu command line, the Terminal, in order to install this tool.

$ sudo apt-get install gnome-power-manager

Note: You can open the Terminal application either through the Ctrl+Alt+T shortcut or through the Ubuntu application launcher search bar.

Alternatively, you can use the Ubuntu Software Manager to install this utility. You can open the Software Manager from the system Dock as follows:

Open Ubuntu Software Center

Search for Gnome Power statistics and the first search entry that you see below is the one you need to install:

GNOME Power Statistics

You can launch this application by entering either “battery” or “power statistics” keywords in your Application launcher search. You can access this search bar by hitting the Super(Windows) key from your laptop.

Search for Battery

The Power Statistics tool opens in the AC adapter view by default. Open the laptop battery view and you will be able to see Details about your battery as follows:

Power Statistics report

The History and Statistics view also give you detailed information about the battery used through the various graphs. This helps you in predicting the health of your battery and it’s potential capability.

Graphical power usage report

View Battery Report from the Ubuntu Command Line

The Ubuntu command line also provides many ways for you to view and monitor your laptops battery’s performance. Please choose one of the following ways, based on your preference, in order to analyze your battery.

Method 1: Through the upower utility

Luckily, the Upower utility comes installed by default in most Linux distros. Enter the following command in your Terminal application to get a detailed battery report:

$ upower -i `upower -e | grep 'BAT'`

Ubuntu upower command

In order to view only the battery charging status, you can use the command in the following manner:

$ upower -i $(upower -e | grep BAT) | grep --color=never -E "state|to\ full|to\ empty|percentage"

Check battery status with upower command

You can use the following command syntax in order to print the report to a file:

$ upower -i `upower -e | grep 'BAT'` > filename.txt

Method 2: Through the Batstat utility

The batstat command lets you view the battery level, energy, full charge energy, battery level history and much more. Use the following steps in order to install the utility from Git:

1. Run the following command in your Terminal in order to get the Batstat clone from the github website:

$ git clone https://github.com/Juve45/batstat.git

Clone Batstat repository

2. Move to the bastat’s bin folder through the following command:

$ cd batstat/bin/

3. Then run the following command in order to copy batstat to the current user’s bin folder.

$ sudo cp batstat /usr/local/bin/

Install batstat command

4. Make the copied binary file executable by running the following command:

$ sudo chmod +x /usr/local/bin/batstat

Make command executable

You are now ready to use the batstat command.

This is the way you can monitor your battery use through batstat:

$ batstat

Using batstat

Method 3: Through the acpi command

The acpi command displays information from the /proc or the /sys filesystem, such as battery status, thermal information, and more ACPI related information.

Run the following command in your Terminal in order to install the acpi utility:

$ sudo apt-get install acpi

Install acpi

Once the utility is installed, run the command with the -V flag in order to view the complete battery report:

$ acpi -V

Get report with acpi -V command

You can run the following command in order to print this report to a text file:

$ acpi -V > filename.txt

These were the very simple 4 ways through which you can get detailed battery report for your Ubuntu laptop. You can make a choice based on your command line or UI preference, and also the format in which the information is displayed.

View Detailed Laptop Battery Report on Ubuntu