Show Battery Percentage in Ubuntu Linux

This quick tip shows you how to display battery percentage in Ubuntu that uses the GNOME desktop environment.
Warp Terminal

It is essential to keep an eye on the battery percentage while using Ubuntu on a laptop. You don’t want to get the notification about low battery at odd or uncomfortable timing.

The good thing is that you can enable battery percentage on your Ubuntu system running the GNOME desktop environment.

This feature is now available in distributions using GNOME 3.38 or later, such as in the case of Ubuntu 20.10+. But in distributions using an older version of GNOME such as Ubuntu 20.04 and 18.04, which are still under extended support, you don’t get this feature. Therefore, you’ll have to use a dedicated tool like GNOME Tweaks.

First, let’s see how to show the battery percentage in Ubuntu 20.10+, where we have this feature native. And then I’ll show you how to do this in Ubuntu 20.04 and older versions.

Display battery percentage in newer Ubuntu versions

First open the Ubuntu Settings app and go to the Power section. Here, enable the "Show Battery Percentage" toggle button.

Enable the battery percentage in Ubuntu GNOME Settings application. This is the newer Ubuntu version settings
Enable Battery Percentage from Settings

When you enable this, you can see the battery percentage appears in the top corner of the Ubuntu panel.

Battery power level showing in new Ubuntu versions panel. If you click on it, then can see the percentage in the quick settings view. Clicking this will bring you to the power settings in GNOME Settings app.
Battery in Ubuntu Top Panel (Latest Versions)

Show battery percentage in older Ubuntu versions

The battery percentage display feature is not available in older versions of Ubuntu. You can use GNOME Tweaks here. GNOME Tweaks is a versatile tool, and you can use it to install themes in Ubuntu, among many other things.

Step 1: Install GNOME Tweaks tool

Installing GNOME Tweaks tool is fairly simple. First, make sure you have the Universe repositories enabled. You can do this by the command:

sudo add-apt-repository universe
sudo apt update

Now, you can use the command below to install GNOME Tweaks:

sudo apt install gnome-tweaks

Alternatively, open the Software Centre and search for GNOME Tweaks. Click on the Install button to install the app.

Install GNOME Tweaks in Ubuntu using the Software Centre. Click on the Install button to download and install.
Install GNOME Tweaks

Step 2: Enable battery percentage in GNOME Tweaks tool

Once installed, start the Tweaks tool by searching for it in Activities Overview. Use Super a.k.a. Windows key to bring up the search option.

Search for GNOME Tweaks in Ubuntu Activities Overview and open it.
Search for GNOME Tweaks

Inside GNOME Tweaks, go to Top Bar in the left sidebar and then toggle the option of Battery Percentage as shown in the screenshot below.

Enable battery percentage in Ubuntu using the GNOME Tweaks app.
Enable Battery Percentage from Tweaks

The changes take place immediately. You can see that your laptop’s battery percentage is displayed in the top-right corner:

Battery percentage is displayed in the top panel in old Ubuntu releases.
Battery Percentage in Ubuntu Panel (Old)

Check battery percentage in command line

Apart from the methods mentioned above, there exists other solutions to see battery percentage.

Fun tools like Neofetch and Fastfetch can show battery percentage in terminal. You have to tweak them to display battery details.

For a quick look at the battery state in the terminal, use the inxi command in this manner:

inxi --battery
Show battery percent using the inxi command in terminal.
Get Battery Percentage using Inxi Command

Get battery details using the Power Statistics app

If you are interested in knowing more than just the battery percentage, the Power Statistics app is your friend. This is preinstalled in all Ubuntu releases, both older and newer.

First, search for Power Statistics in Ubuntu Activities Overview.

Search for Power Statistics in Ubuntu Activities Overview
Search and Open Power Statistics App

Inside the app, go to the Laptop Battery section. In the Details section, you can see the battery percentage, time to empty, energy, capacity etc.

The Power Statistics Ubuntu app displaying the battery percentage, expected time, etc. To get this, go to the "Laptop Battery" section and scroll down a bit on the "Details" tab.
Battery Percentage in Power Statistics App

I prefer to see the battery percentage, be it my laptop or my phone. It gives you an idea of how much battery is remaining on the system, instead of you trying to guess from those tiny bars in the battery icon.

By the way, it is not good for battery health to have the laptop always plugged in. You may want to limit the charging levels to prolong the battery life.

How to Limit Charging Level in Linux (and Prolong Battery Life)
Prolong your laptop’s battery life in long run by limiting the charging to 80%.
About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.