
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.

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

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.

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.

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.

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

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

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.

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.

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.
