Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Check the OS Version in Linux

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

When we want to install the software on our system, firstly we must know whether our current Operating System is supporting this version of the software or not. In Windows, we can easily check it as Windows is totally based on a GUI-based Operating System.

But we prefer to use the Command line instead of the GUI in Operating System like Linus/Unix. In this article, we will learn how to check the details of the Operating System we are using in Linux.

We will use Four simple methods to check the Linux OS version:

1) Using os-release file available in Linux’s etc directory.

We can check the Linux Operating System (OS) info by running the below command.

cat /etc/os-release 

Output:

used `cat /etc/os-release` for displaying OS version in linux

used `cat /etc/os-release` for displaying OS version in linux 

2) Using lsb_release command.

LSB Stands for Linux Standard Base, we can check the Linux Operating System (OS) using lsb_release command.

lsb_release -a

Output:

used `lsb_release -a` for displaying OS version in linux

used `lsb_release -a` for displaying OS version in linux 

3) Using the `hostnamectl` command.

We can use the below command to check the Linux Operating System (OS)

hostnamectl

Output:

used hostnamectl for displaying OS version in linux

used hostnamectl for displaying OS version in linux 

4) Using GUI (Graphical User Interface).

We have three simple steps to find our OS version in Linux.

Step 1: Click on the start menu application.

As shown below.

click the application pointed by yellow arrow

click the application pointed by yellow arrow

Step 2: Search Setting on Search bar.

Click on settings as shown below.

click the application pointed by yellow arrow

click the application pointed by yellow arrow

Step 2: click on About.

As shown below.

click on about to view the details

click on about to view the details

Conclusion

It is essential to know the operating system version when we are installing software or performing any kind of system update. While checking the OS version in Windows is straightforward due to the GUI (Graphical User Interface), whereas in Linux users have several ways to check OS version including OS-release file, lsb_release command, hostnamectl command, or the GUI (Graphical User Interface). One must understand the importance of knowing the cli methods to find out the OS version as Linux is mostly used for cli, by this user can troubleshoot issues, install new software, and keep the system updated.

My Personal Notes arrow_drop_up
Last Updated : 05 May, 2023
Like Article
Save Article
Similar Reads