When we want to install the software in our system, firstly we must know that 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 three simple methods to check the Linux OS version:
- Using os-release file available in Linux’s etc directory
- Using lsb_release command
- Using version file available in Linux’s proc directory
Example 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
Example 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
Example 3: Using version file available in Linux’s proc directory.
We can use the below command to check the Linux Operating System (OS)
~$ cat /proc/version