The alternative for the Mac_os and Windows_os is the free Linux/Ubuntu operating system. This operating system is highly flexible and contains the pre- installed version of software. This system is beneficial for the developer in developing their softwares. But sometimes  the developer needs to update their operating system for this they need to know the version. This article gives you the best information about checking the version of your operating system. 

How to Check OS Version From Linux/Ubuntu Terminal?

There are two methods available to check the operating system version in Linux/Ubuntu operating system.

  • Check the version from the Terminal
  • Check the version from the GUI method

Method 1: Check the version from the Terminal

There are different commands available in the Linux/Ubuntu terminal to check the operating system version. Open the terminal by pressing the shortcut key “Ctrl+shift+T” from your keyboard and execute the below-given command.

1: Using the “lsb_release” command

To check the version of Linux/Ubuntu operating system the command to be executed in the terminal is given as.

lab_release -a

The result output of the above command is given in the below figure. The use of the “-a” flag with “lsb_release” command gives the detail output results.The results clearly shows description and release version of Linux/Ubuntu. 

2: Using the “cat /etc/lsb-release” command

The command to check the version of operating system is executed in the Linux/Ubuntu terminal is given as

cat /etc/lsb-release

The below given figure is the output result of the above command. “Cat”command is mostly used to obtain the result related to the system utilities. The above given command is mostly used for outdated versions of Linux/Ubuntu. The output contains the “ID”, “RELEASE”, “CODENAME”, and “DESCRIPTION”. Linux version name and links are not included in the output result of this command.

3: Using the “cat /etc/issue” command

To obtain the results of the version of your Linux/Ubuntu operating system the command that needs to be executed in the terminal is given as.

cat /etc/issue

The output result of the above command is given in below figure. This command gives you only the version of the Linux/Ubuntu operating system as output. You can use this command when you are in a hurry and not in position to collect more information.

4: Using the “hostnamectl” command

The command to check the version of operating system is executed in the Linux/Ubuntu terminal is given as

hostnamectl

The detailed output result for the version check is obtained by implementing the above command in the terminal as shown in the figure below. The “hostnamectl” command is basically used to change the hostname of your operating system but this is also used to get the detailed output result for the version. The output contains the “Operating System”, “Kernel”, “Boot ID”, “Chassis” and  other information.

5: Using the “cat /etc/os-release” command

The below mentioned command is executed in the Linux/Ubuntu terminal to obtain the result for the version. 

cat /etc/os-release

The below figure is the output result for the above command. The output result obtained by this command is similar to the result obtained by the “cat /etc/lsb-release” command. The only difference is that the “cat /etc/os-release” command gives some link in the output.

6: Using the “grep” command

To obtain the version statistics in the Linux/Ubuntu operating system the command needed to be executed in the terminal is given as.

grep '^VERSION' /etc/os-release

The output of the above command is given in below figure. The “grep” command is basically used to obtain the result for the choosan word, for example, here use the word “VERSION” with “grep” command to get the result for the VERSION word used in the operating system library. The output result contain the “ID”, “VERSION” and “CODENAME” information. 

The “grep” command is used with the “VERSION|NAME” to obtain only these two to as output. The below result clearly gives the “NAME” and “VERSION” of the operating system.  

grep '^(VERSION|NAME)=' /etc/os-release

Method 2: Check the Version from the GUI Method

To obtain the version statistics of Linux/Ubuntu operating system GUI is the most easy way. Follow the given below step to obtain the version information by GUI method.

 Step 1: Now open the application icon by simply clicking on it. 

Step 2: Now search for the “Settings” in the search bar and click to open it.

Step 3: Now from the settings click on the “About” option. This opens the information about the operating system. The information contains the “OS Name”, “OS Type”, “Graphics” and other statistics. 

Conclusion

To check the version of the Linux/Ubuntu operating system there are two important methods such as by using the terminal and by using the GUI method. There are different commands available in the terminal to obtain the version statistics such as “lab_release -a”, “cat /etc/lsb-release”, “hostnamectl”, and “grep”. Among all these commands the best one is the “hostnamectl” because this gives the results in more detail as compared to the other command.

Frequently Asked Questions

How can I check the operating system version in Linux/Ubuntu using lsb_release command?

To check the OS version in Linux/Ubuntu using lsb_release command, open the terminal and execute 'lsb_release -a'. This command provides detailed output including description and release version.

What is the command to check the version of Linux/Ubuntu operating system through cat /etc/lsb-release?

To check the OS version in Linux/Ubuntu using 'cat /etc/lsb-release' command, open the terminal and execute the command. The output includes ID, RELEASE, CODENAME, and DESCRIPTION.

How do I open the terminal in Linux/Ubuntu to check the OS version?

In Linux/Ubuntu, you can open the terminal by pressing Ctrl+Shift+T on your keyboard. Once the terminal is open, you can use commands like lsb_release or cat /etc/lsb-release to check the OS version.

Why is it important to know the version of the Linux/Ubuntu operating system?

Knowing the version of your Linux/Ubuntu OS is crucial for compatibility with software updates and troubleshooting issues. It helps you understand the features and support available for your specific OS version.

What are the benefits of using the Linux/Ubuntu operating system for software development?

Linux/Ubuntu OS offers flexibility, pre-installed software, and a developer-friendly environment for software development. It provides a cost-effective alternative to Mac OS and Windows OS for developers.

Can I check the Linux/Ubuntu OS version through a GUI method?

Yes, you can also check the OS version in Linux/Ubuntu through a GUI method. However, using the terminal commands like lsb_release or cat /etc/lsb-release provides more detailed information about the OS version.

What information does the 'lsb_release -a' command provide in Linux/Ubuntu?

The 'lsb_release -a' command in Linux/Ubuntu provides detailed output including the description and release version of the operating system. It gives comprehensive information about the OS version.

How can I obtain system-related details using the 'cat' command in Linux/Ubuntu?

In Linux/Ubuntu, you can use the 'cat' command to obtain system-related information. For checking the OS version, executing 'cat /etc/lsb-release' command provides specific details like ID, RELEASE, CODENAME, and DESCRIPTION.