How To Check Ubuntu Version By Using The Command Prompt

How To Check Ubuntu Version By Using The Command Prompt


Ubuntu is a relatively popular operating system that is used by many people all over the world. One of the main reasons why people use Ubuntu is because it’s an open-source OS. It’s considered to be one of the most intuitive and customizable OS one can find. However, many people still don’t know how to check Ubuntu version.

This is a genuine problem since most users don’t know how to do so, as it requires some coding knowledge. If you wish to learn the methods and codes to do so, then read this guide till the end. After reading this, you can check the Ubuntu OS version you are using, using command prompts and tweaking GUI settings.

Why Should You Check Ubuntu Version?

Why Should You Check Ubuntu Version

Ubuntu is a great OS that’s built on the foundations of the Linux OS. This makes it a great OS to manage server-side computing. Since it helps in doing so, it is a favorite amongst various back-end developers. In addition, you can customize almost every aspect of the UI and the UX of Ubuntu.

However, unlike Windows or macOS, you cannot get details about the current version of Ubuntu. This is because the process of Ubuntu check OS version is pretty different. Here, you have to learn the use of some codes in the Ubuntu terminal to check version information.

Therefore, you would want to check your Ubuntu version every now and then since they often update the OS. Most Ubuntu updates come every six months. However, there are many smaller updates that are rolled out every month. In addition, checking the current Ubuntu version will help you decide which software to use as per what’s supported.

How To Check Ubuntu Version By Using The Command Prompt?

How To Check Ubuntu Version By Using The Command Prompt1

1. Using The “lsb_release -a” Command

You may view information about your Linux distribution with the LSB release command. For instance, it shows the information on LSB modules. Additionally, the distributor’s ID and release number are displayed.

This command returns every piece of data if “-a” is added at the end. If you need to quickly determine your Ubuntu version, you might want to use this approach because it is rather simple.

To use this command to check Ubuntu version, you need to:

  1. First, open your Ubuntu terminal.
  2. Then, type this command line: lsb_release -a\ and press Enter.

Your Ubuntu version is shown next to the Description header. Additionally, information about your LSB modules and your distributor’s codename is visible.

2. Using The “/etc/lsb-release” Or “/etc/os-release” Commands

You can see your Ubuntu version, along with separate lines for the release number and its explanation, using the “/etc/lsb-release” command. If you’re using an old version of Ubuntu, you might wish to utilize it as it is made for older computers. Here, the “/etc/os-release” command can also be used to get the same data. With Ubuntu 16.04 and newer, this works.

The number of your Ubuntu version and its release name will then appear in a list of data. A few links to the Ubuntu website and helpful resources are also provided. The release ID, description, and codename are displayed in simplified results when you use the “/etc/lsb-release” command. The links and the name of the Ubuntu version are absent.

  1. First, open your Ubuntu terminal.
  2. Then, type this command line: cat /etc/lsb-release or cat /etc/os-release and press Enter.

3. Using The “hostnamectl” Command

All Ubuntu systems can be identified by finding out the hostname. Here, the hostname refers to the user of this particular Ubuntu system, including your machine ID. However, this command prompt will only work in Ubuntu v16.04 and later.

To use this command, follow the steps below:

  1. First, open your Ubuntu terminal.
  2. Then, type this command line: hostnamect1 and press Enter.

4. Checking The “/etc/issue” File

One of the most important documents in your Ubuntu system is the /etc/issue file. This is a text document that contains all data related to your Ubuntu OS, like its version and identification data.

Many Ubuntu users prefer using this method over others since the /etc/issue file only contains your Ubuntu system information. Unlike the other methods, the text document doesn’t contain any additional data, making it easier for people to understand it. The text document will have only a single line of info, something like – Ubuntu 18.04 LTS \n \1. Here, 18.04 refers to the current Ubuntu version you are running.

To do so, you need to:

  1. First, open your Ubuntu terminal.
  2. Then, type this command line: cat /etc/issue and press Enter.

How To Check Ubuntu Version In GUI Settings?

How To Check Ubuntu Version In GUI Settings

Apart from using several lines of code in Ubuntu, you can also check Ubuntu version through the GUI settings. In my opinion, this is better for beginners who have just started using Ubuntu. However, using command prompt codes is still easier and faster than this method.

To check Ubuntu version using GUI settings, follow this step-by-step process explained below:

  1. First, open the Show Applications menu. This icon is located in the bottom left corner of the screen, indicated by nine squares lumped together.
  2. Then, navigate to the Settings option here and click on it.
  3. Here, click on the About section that you can see on the left of the screen. It is the last option in the options panel.
  4. After you click on the option above, you will be able to see the OS Name on the right-hand side of the screen. The OS Name will state which version of Ubuntu you are using.

FAQs (Frequently Asked Questions):-

I have answered various questions asked by Ubuntu users, related to how to check Ubuntu version.

Q1. Which Ubuntu Version To Use?

Ans: To learn how to check Ubuntu version, it’s best if you can do them on Ubuntu version 20.04 LTS. This is because all versions released after this are considered to be the most stable Ubuntu releases so far.

Q2. How To Check Java Version Ubuntu?

Ans: To check Ubuntu Java version on Ubuntu 22.04 and above, you need to:
1. First, open the Ubuntu terminal.
2. Type in the code java-version and click on Enter.

Q3. How To Check Cuda Version Ubuntu?

Ans: If you wish to find out which NVIDIA Cuda version you are using in Ubuntu, you need to find the Cuda directory. To do so, you need to use the following codes on the Ubuntu terminal – $ find /usr -type d -name cuda. /usr/lib/cuda.

Q4. What Does “Unable To Locate Package XRDP” Mean In Ubuntu?

Ans: This code is shown in Ubuntu when you try to install a new software package, and it fails. To fix this issue, you can:
1. Update the repository cache
2. Check Ubuntu version and see if the package is supported in the current version or not.
3. Check for typos in the package name.

Final Codes

It’s pretty easy to check Ubuntu version with just a few lines of code. All you need to do is copy the codes and paste them into the Ubuntu terminal. Then, press Enter and it will run automatically, providing you with the Ubuntu version information that you wished to know. In addition, you can also check the GUI settings to get your Ubuntu version as well.

Have A Look :-

Share 0
Tweet 0
Pin it 0
Share 0
Leave a Reply

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

You May Also Like