The Kernel is the essential component of any operating system because it manages the processes, resources, and provides a mechanism for communication between software and hardware. There are many Kernel versions available; you could face situations where you’ll have to check the version of the installed Linux kernel on your Linux system. For example, if you want to debug the hardware issue, then you will be interested in checking the Linux Kernel version.

This post presents various commands to check the installed Linux Kernel version on your Linux system. I am using Ubuntu 20.04 for preparing this article and executing the command. The commands used in this article are generic and can be used on other Linux based operating systems like Linux Mint, Fedora, Debian, etc.

Check the Linux Kernel version with the uname command

uname command displays the system information. To check the Linux Kernel installed version, type the below-given command:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/image1-4.png" data-lazy- height="113" src="data:image/svg xml,” width=”811″>

The output shows that the Linux Kernel version 5.10.0-051000 is installed on my Ubuntu 20.04 system. The explanation of the Kernel version is as follows:

5- Kernel version

10-Major revision

0-Minor revision

051000-Patch number

Whereas, the generic confirms that I am using the desktop version of Kernel.

Check Linux Kernel version using the dmesg command

The basic purpose of the dmesg command is to write the Kernel messages. It is also used for checking the Kernel version. Run the dmesg commands with the sudo privileges in the following way to check the Kernel version:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/image3-4.png" data-lazy- height="354" src="data:image/svg xml,” width=”815″>

Check Linux Kernel version using the hostnamectl command

The hostnamectl is a very useful command that is primarily used to change the system hostname. Additionally, it also shows the Kernel version.

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/image2-4.png" data-lazy- height="262" src="data:image/svg xml,” width=”808″>

Specifically, to only check the Kernel version, use the grep command with hostnamectl:

$ hostnamectl | grep -i kernel

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/image5-4.png" data-lazy- height="87" src="data:image/svg xml,” width=”816″>

Check Linux Kernel version using the /proc/version file

The proc file system is a virtual file system that is created when the system is started, and it vanishes when the system shutdown. In the /proc file system, the Linux Kernel information is stored in the version file. The cat command can be used for printing the version file system content.

Type the below-given command to check the Linux Kernel version:

<img alt="" data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/image4-4.png" data-lazy- height="132" src="data:image/svg xml,” width=”817″>

Conclusion

The article explains the various commands that we can use to check the installed Linux Kernel version. These commands work on various Linux distributions like Debian, CentOS, Fedora, Linux Mint, etc.

About the author

<img alt="Kamran Sattar Awaisi" data-lazy-src="https://kirelos.com/wp-content/uploads/2021/02/echo/52E439DD556343299E3D211D5E577D28-150×150.jpg" height="112" src="data:image/svg xml,” width=”112″>

Kamran Sattar Awaisi

I am a software engineer and a research scholar. I like to write article and make tutorial on various IT topics including Python, Cloud Computing, Fog Computing and Deep Learning. I love to use Linux based operating systems.