How to show battery percentage in the Ubuntu top bar
  John   |     19 May 2022

How to show battery percentage in the Ubuntu top bar

In this article, I will show you how to display the battery percentage at the top bar on Ubuntu.

By default, the battery percentage is not displayed next to the battery icon at the top bar in Ubuntu Linux.

Ubuntu 20.04 top bar

To see what percentage of charge the battery has, you will need to open the menu by clicking on any of the icons at the right of the top bar.

Ubuntu top bar menu battery percentage

If you would want to see the battery percentage (next to the battery icon) at any given time without having to open the dropdown menu every time, follow the steps below:

Step 1: Install the GNOME shell extensions by running the terminal command below. 

sudo apt install gnome-shell-extensions

Skip this and step 2 if you have GNOME extensions and Tweaks installed.

Step 2: Install the GNOME Tweaks app (if you don't have it installed already).

To do so, open the Ubuntu Software, click on the search icon at the top left and then type "gnome tweaks" in the search box.

Searching for GNOME tweaks in Ubuntu software

Click on it to open it, then click on the Install button to have it installed.

Installing GNOME tweaks in Ubuntu software

You can alternatively open the terminal (Ctrl+Alt+T) and run the command below to have it installed.

sudo apt install gnome-tweaks

Step 3: Open the GNOME Tweaks app. It will be available in the Applications menu, just click on it to open it.

Opening the GNOME tweaks app

Open the Top Bar tab and turn on the Battery Percentage toggle button in the right pane.

Turning on top bar battery percentage in GNOME tweaks app

You will now be able to see the battery power percentage at the top bar just next to the battery icon.

Top bar battery percentage in Ubuntu

To reverse the action, all you will need to do is turn off the toggle button and the battery percentage will cease displaying anymore.

Showing the battery percentage with the terminal command

Alternatively to the description above, there is even a shorter way to show the battery percentage on the top bar with a single terminal command.

Open the terminal (Ctrl+Alt+T) and run the command below:

gsettings set org.gnome.desktop.interface show-battery-percentage true

Showing top bar battery percentage via terminal command

That's it.

Now you know how to show or hide battery percentage next to the battery icon at the top bar in Ubuntu.