Check Kernel Version in Linux: Linux Kernel is the free and open-source, Unix based operating system. The Linux mainly adopts the Kernel and deployed on Linux based Desktops & Linux based Servers. The Linux Kernel works like the bridge or a connection between the Hardware and Software. The Linux kernel versions are released by contributors all around the world. These Linux kernels are released under the GNU license. The older versions of the Linux Kernel contains many major problems and so each day the contributors all around the world are trying to fix those error and bugs. The latest version of Linux Kernel is bugs free and have enhanced security. The older versions have some vulnerability leak and so it is more suggestable to upgrade your Linux version to the latest. In this article, We are going to provide the information about finding the Linux Kernel version using the command line in Terminal.
- Find Linux Kernel Version Using uname Command
- Find Linux Kernel Version Using hostnamectl command
- Find Linux Kernel Version Using /proc/version File
How To Find Linux Kernel Version Using uname Command:
There are many ways available to find the Linux Kernel version, Using uname to check Linux Kerner version is the most commonly used method. The uname is the common command which displays the several system information including the Linux kernel architecture, name version, and release. To find the version of kernel just copy the following command:
The above image says the Kernel version of the Ubuntu Linux OS. uname -srm will displays the kernel of structure of Ubuntu Linux. Linux 5.0.0-20-generic x86_64 is the commonly used version comes with Ubuntu 19.04 Disco Dingo edition.
The Kernel version can be explained as:
- 5– Kernel Version.
O– Major Revision.
O– Minor Revision.
- 20– Patch number.
- generic – Distribution specific information.
- _64– 64 Bit Ubuntu version.
How To Find Linux Kernel Version Using hostnamectl command:
The hostnamectrl is the command which helps to display the Linux Kernel version. The hostnamectrl is the part of the systemd helps you change the system hostname.
The above image shows the output of the “hostnamectl” command. Which also displays the Linux Kernel version.
Using GREP to extract the Linux Kernel Version in hostnamectl Command:
As you know, The hostnamectl command, display you all details about Linux PC. To display the extracted Linux Kernel version by using the GREP command is:
The output of the following command is:
How To Find Linux Kernel Version Using /proc/version File:
You can check the Linux Kernel version of Linux using the /proc/version file. The /proc directory contains the virtual files information about mounted file systems, memory & cores. The Linux Kernel version is always stored in /proc directory. The following command will help you display the Kernel versionThe cat command displays the content of the file.
The output of the above command is:
The above image shows that the ouput of the “/proc/version/ file“. The Linux Kernel version is listed in the above image.
That’s it, In this article, we showed the different ways to find the Linux Kernel version. The commands should work on all popular Linux Distributions including Debian, Red Hat, Ubuntu, Arch Linux, Fedora, CentOS, Kali Linux, OpenSUSE, Linux Mint.
- Content Explanation
- Images Explanation
- Commands Listed
- Alternate Commands
For more information kindly visit our HomePage