When it comes to web hosting, a VPS, or other similar online services, Linux is king. There are simply more advantages to using Linux than Windows for web hosting purposes, but we will not get into that today. Instead, let’s assume that you have a new Linux online service, a VPS perhaps, and you want to find out what version of Linux is installed.
As Linux is a free and open-source operating system, there are many variants of it out there, called Linux distributions. Some of the most popular ones are Debian, CentOS, Ubuntu, Fedora, and RHEL, among many others. It is important to know your operating system version for the installation of almost any application and security patches.
How to find Linux version
There are multiple ways to find the operating system version in Linux, here are some of them:
- Using the cat command:
Type in the following command into the Linux terminal:
The output should look like this.
You can see the result above, but if you want a filtered version, simply enter this command:
grep '^VERSION' /etc/os-release
As you can see in the output below, it gives the distribution name and its version
- Using hostnamectl command:
Open the terminal and type the following command into it:
The result should look somewhat alike to this:
- Using uname command:
This will not provide you the exact distribution and version, but the kernel version
This is an example output:
Alternatively, you could also use this command:
And this will be the result:
In this article, we discussed how to find out your Linux distribution, version, and even the kernel version. If you found this tutorial helpful or have any questions, please leave a comment below and we will do our best to answer them.