Find Ubuntu Version

In this article we will learn 5 different ways to check Ubuntu version of system. 4 ways are command line and 1 method is by using Graphical User Interface(GUI). Knowing the Ubuntu version of your Operating System is also important. Example like if you want to upgrade your Operating System also, you need to find Ubuntu version of your system. To check the compatibility of any software, you have to check the Ubuntu version of the system. Similarly there are different use cases where you need the information about Ubuntu Version or your Operating System version.

4 Commands lines to find the Ubuntu version

Here in this section, we are mentioning the 4 terminal commands through which you can find the Ubuntu version. Open the terminal and run the follow commands to find the Ubuntu version.

lsb_release command

Open the terminal and run the given below command. In this command, you will also find the Codename of the Ubuntu Operating System.

sudo lsb_release -a

hostnamectl command

Use this command where you will also find also very useful information. But in the output, you will easily find the Ubuntu version.

hostnamectl

Read lsb-release File

Similar to lsb_release command, the name of file is lsb-release. It also has Ubuntu version related information.

cat /etc/lsb-release

Read issue file

In this file, you will get information of Ubuntu version.

cat /etc/issue

GUI Method to find Ubuntu version

You can also find the Ubuntu version in Graphical mode.

In Graphical User Interface(GUI), Go to Dash Home > System > About.

Frequently Asked Questions (F.A.Q)

Any scenario where we can use these command in bash scripting or any automation tool?

Yes, in bash scripting or any scripting we also first check what is the Operating System version, type and other details. When condition matches then the further action will be taken from the script. For example, if we want to install a specific Nginx version only in Ubuntu 24.04 LTS then we can use these terminal commands to find out what is the Ubuntu version is. This kind of scenario is also used with other Automation tools and utility like Ansible, Chef, Puppet, Salt etc.

Is it interview question?

Yes, this is also important question. Because it is very basic and expected from the Engineer that they should be aware of the method to find Operating System version.

Read Some More Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.