5 Ways to Check the Linux Version

Are you wondering how to check the Linux version that you are running on your system? Let's show you various ways you can fish out the OS details.

When most people talk of Linux, they are always referring to a Linux distribution. However, this is not the case. Linux itself is a kernel which acts as a bridge between user applications and the hardware. When we talk of a Linux distribution, we refer to an operating system developed from the Linux kernel. A distribution comes with a package manager, pre-installed applications, a Desktop Environment, and several more features.

Some of the popular Linux distributions include; Ubuntu, Fedora, Manjaro, CentOS, Kali Linux, Linux Mint, and more. In this post, I will use a Linux distribution called Parrot. It is one of the many penetration testing distros available. Others include Kali Linux, Backbox, etc.

Knowing the Linux version running on your machine will help you a great deal. For example, understanding which Linux distribution you are using will determine how you install your applications and packages. That is because every Linux distribution comes with its package management system.

In this post, you will learn how to check your Linux distribution, its version, and the kernel using the command-line.

Check the Linux Version

There are several terminal commands that you can execute to know your Linux version and distribution.

1. The “lsb_release” command

The lsb_release is a utility that provides Linux Standard Base (LSB) information about the distribution you are using. This command should work on all Linux distribution, which has the lsb_release package installed.

Execute the command below in the Terminal.

lsb_release -a

lsb_release utility
lsb_release utility

From the output shown in the image above, the ‘Description’ value shows I am currently running Parrot GNU/Linux 4.7.

If you wanted only to display this description information, including the ‘-d’ parameter instead of ‘-a.’ See the command below.

lsb_release -d

lsb_release utility
lsb_release utility

To list other arguments you can use with the “lsb_release” utility, use the ‘–help’ option as shown below.

lsb_release --help

lsb_release help command
lsb_release help command

If you get an error like “command not found: lsb_release” don’t worry, there are still other commands we can use to determine your Linux version.

2. Display “/etc/os-release” file contents

Another method you can use to know your Linux distribution and version is checking the contents of the ‘os-release‘ file in the ‘/etc. ‘ directory. You can use the ‘cat’ or ‘less’ command to display the contents.

cat /etc/os-release
less /etc/os-release

os-release file
os-release file

3. Display “/etc/issue‘ file contents

Another way is displaying the contents of the ‘issue‘ file in the ‘/etc.’ directory. It holds the system identification text displayed before login. Run the command below.

cat /etc/issue

issue file
issue file

4. The “hostnamectl” command

Another powerful utility we can use is ‘hostnamectl.’ It displays information about the Linux distribution, version, kernel, and more. You can also use it to change the hostname.



5. The “uname” command

The uname command shows information like the kernel architecture, version, name, and release. Execute the command below.

uname -srm


Additional Commands…

If the above commands don’t work for, you will probably run an old or outdated Linux distribution. However, this doesn’t mean its dead end for you. Try any of the commands below;

cat /etc/*release
cat /etc/*version

outdated Distributions
outdated Distributions


Those are four ways you can use to check your Linux version. My favorite method is using the “hostnamectl” command. I find it more comfortable and convenient. What about you? Feel free to tell us below.

Arun Kumar
Arun did his bachelor in computer engineering and loves enjoying his spare time writing for FOSS Linux. He uses Fedora as the daily driver and loves tinkering with interesting distros on VirtualBox. He works during the day and reads anything tech at night. Apart from blogging, he loves swimming and playing tennis.


Please enter your comment!
Please enter your name here





Buyers who wish to go for a machine that is based on Linux often show interest in Chromebooks due to the form factor and extended battery life capabilities. Although ChromeOS power these machines, users can still miss out on a more genuine Linux experience. For those who happen to agree, the new Lemur Pro by System76 might get some heads turning.
Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.

6 Best Linux Distributions for Beginners

Making the shift to Linux is not as complicated as some people make it out to be. There is a variety of Linux distributions available that cater to the needs of people who are planning on making the jump to Linux from any other operating system.

10 Reasons to use Cinnamon as your Desktop Environment

With the release of Gnome 3 in 2011, there was quite a mixed reaction from users and developers. Most of them preferred the original Gnome that got forked, and one of those forks was Cinnamon. Since the release of Cinnamon 2.0, Cinnamon has evolved to become a desktop environment by itself.

The 6 Best Linux File Recovery Software

Now and then, most of us lose important data in our computers either through accidental deletion, virus attacks, permanent removal of files, etc. Some of these files contain critical information that cannot be assumed and needs recovery. In this post, we will discuss some of the best data recovery available for Linux systems. The fantastic part is that most of them are opensource and freely available for use.

What is the difference between Linux and Unix?

When discussing Linux and Unix with average users, it's not uncommon that they will sometimes mistakenly interchange the terms Linux and Unix.  The two are not the same.  Though they share similarities in their overall structures and toolkits, they are decidedly not the same.