How to Check the Ubuntu Version Using GUI and CLI Tools

Not sure what Ubuntu version you are using? Then read this guide to learn different ways to check your Ubuntu version.

Whenever you try to install any application on your Ubuntu system, all the guides and videos suggest that you to run the particular command only if you are running the specified version.

Not only that, some people just say codenames like Ubuntu Bionic Beaver, Jammy JellyFish, and Lunar Lobster, which can be confusing for new users.

If you are one of those new users, don’t worry! You can always look up the version name along with the version number of your Linux distribution.

So I’ll be with you to show you all the different ways to check the version of Ubuntu with a very simple command that gives very basic output, and some commands will help you to brag yourself in front of your Linux geek friends”.

If you are ready, then scroll through the article or use the table of contents to start with the particular command.

How to Check the Version of Ubuntu

As I said earlier, there are several ways to get information about the Linux version.

Some of the commands will display information like hostname, kernel version, architecture, codename, and much more other information about your Ubuntu distribution.

The most common way to check the version of a Linux distribution is as follows:

Step 01Check Ubuntu version by using /etc/os-release

If you ask me one of the common ways to check the version of Ubuntu or any other Linux distro, then without thinking much, I’ll suggest you to read the /etc/os-release file.

This file contains all the information about your system, like PRETTY_NAME, VERSION_ID, VERSION, VERSION_CODENAME, and other support information about distributions.

Now open your system terminal by pressing "Ctrl + Alt + T" and type the following command to show you the Ubuntu version:

$ cat /etc/os-release

The result of the above command is shown below:

Check Ubuntu version by reading /etc/os-release/ file
Check Ubuntu version by reading /etc/os-release/ file

I think output makes everything clear for you, doesn’t it?

Step 2Check Ubuntu version by using hostnamectl

There is also another way for you to check the Ubuntu version using the hostnamectl command, which is also quite useful for knowing information about the operating system.

Along with that, it also solves the problem of identifying the kernel version of your Linux distribution.

Quite handy information, right? Then type the following command into your system terminal to get the Ubuntu version and the kernel version too.

$ hostnamectl

The result of the above command is shown below:

Check Ubuntu version by using hostnamectl command
Check Ubuntu version by using hostnamectl command

The hostnamectl command can do more than getting information about computers, read How to set or change the temporary hostname in Linux using hostnamectl.

Step 3Check the Ubuntu version by using lsb_release

You can even leverage the lsb_release command to check the information about the releases of Ubuntu or any other Ubuntu based distro like Pop!_OS, Linux Mint, etc.

The lsb_release command cannot show information about your system until you choose the following options: -a or --all, -c or --codename, -d or --description, -r or --release, and -s or --short

Now let’s use the -a option to show all the available information about your Ubuntu or Linux distribution.

$ lsb_release -a 

If you just want to know the codename and release version of your Ubuntu, then just use the following command:

$ lsb_release -cr

The result of the above command is shown below:

Check Ubuntu version by using lsb_release -a
Check Ubuntu version by using lsb_release -cr

Step 4Check the Ubuntu version by using Screenfetch

Above, you have learned how to check the Ubuntu version by running a command that prints information about the system in a very simple way.

But you can also use the screenfetch command to display not only the Ubuntu version but also information about the system’s hardware, packages, and shell in a more visually appealing way.

For this, first you need to install the screenfetch command by running the following command:

$ sudo apt install screenfetch

Then execute the screenfetch to show the information in an “ASCII art” format, which makes it more fun and interesting to look at.

Check Ubuntu version by using screenfetch command
Check Ubuntu version by using screenfetch command

Step 5Check the Ubuntu version by using Neofetch

Another great option available to you is to use neofetch, which works similarly to screenfetch but has more customization options than screenfetch.

So now go to the terminal window and run the following command to install Neofetch on your Ubuntu machine:

$ sudo apt install neofetch

Once you install Neofetch, type neofetch to show the information about your machine.

Check Ubuntu version by using neofetch command
Check Ubuntu version by using neofetch command

I think from the output you may now understand how this screen is used by the people in social media and forums to show what discussions, themes, icons, configurations, and hardware they are using.

Graphical User Interface

The above steps were reasonable enough to get all the details about your Ubuntu or Ubuntu based system. However, if you are not comfortable with the terminal, then you can just use the System setting to view the system details.

There will be some different steps to check in different Ubuntu-based environments or distributions. If you have the default GNOME desktop environment, the steps will be the same.

The steps are as follows.

  • Press the Super key 
  • Search for settings or directly type about
  • If you have type settings, then scroll down and click on About
  • You will see all the details about your distribution in the below image.
Shown Ubuntu Version
Shown Ubuntu Version

Wrap up

That’s all for this article, where I showed you six different ways to check the version of your Ubuntu machine, which include reading the file /etc/os-release, installing Neofetch, and using Screenfetch for the most visually perfect information about your system.

Now let me recap the command that we have used to check the Ubuntu version.

Here are the commands that you can use to check the Ubuntu version:

  • cat /etc/os-release
  • hostnamectl
  • lsb_release -a
  • screenfetch
  • neofetch

Also, I list some of the Ubuntu codenames with versions so you can easily know which codename belongs to which version.

  • Xenial Xerus: Ubuntu 16.04 LTS
  • Bionic Beaver: Ubuntu 18.04 LTS
  • Focal Fossa: Ubuntu 20.04 LTS
  • Jammy JellyFish: Ubuntu 22.04 LTS

Please comment below and let me know which method you prefer to check the version.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments