Whenever I heard the word Kernel before using Linux, I always thought of the Corn Kernels. But Kernels in Linux have a totally different meaning. Linux Kernel is the core compojnent of the system, which manages the communication between the system and the software.
Every Linux distro comes with a different Kernel version. You must know the kernels for different reasons for installing softwares like Handbrake or code editors. I use various methods to check the Kernel version in Linux. I am listing all of these ways in this blog post. Here you go:
How to Check Linux Kernel Version
Method #1 – Find Kernel Details using the uname command
uname is the simplest command in Linux that prints out the Kernel version. To run this command, open the Terminal window with the “Ctrl + Alt + T” key combination on your keyboard. Type the following command and press ENTER to check the Linux kernel Version.
uname -r
This command will display the kernel version. It may look like this: 6.5.0-35-generic
In this kernel version, the numbers explain the details about the Kernel itself.
- 6 – Is the Kernel version
- 5 – Is the Major Revision of the Kernel
- 0 – Minor revision ( In this case, no minor revision has been made )
- 35 – This is the number that identifies the Bug fix.
- generic – This highlights the type of Kernel or the OS release. As this is a personal-use desktop version, it says generic.
Method #2 – Use /proc/version file for Linux Kernel
Now, I am going to show you the second method. The /proc/version/ command will help you check more detailed information about the current and active Kernel on your desktop. Here are the steps that you need to follow.
Open the Terminal and type or paste the following command.
Cat/proc/version
This will show the Kernel in detail. Here is an example from my system.
Linux version 6.5.0-35-generic (buildd@lcy02-amd64-079) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2
The kernel version is 6.5.0-35-generic, as mentioned in the output.
Method #3 – Use the dmesg Command to Find Linux Kernel Details
DMESG is an advanced command that shows detailed information about the Kernel. This command is paired with a variety of parameters to access the Kernel and add messages to it. This is meant for advanced users, and you should use it with caution. Just type or paste the following command in the Terminal.
sudo dmesg | grep Linux
You can refer to the screenshot to see the details of the Kernel that my Zorin OS is running on. Fascinating, isn’t it?
Method #4 – Hostnamectl to Find Linux Kernel Version
Hostnamectl is a common command that has numerous parameters and used for a wide range of operations. You can use this command and find the kernel version. Here’s how to use this command in Linux Terminal.
hostnamectl | grep Kernel
You can see the simple output of the Kernel in the screenshot attached here.
Frequently Asked Questions
#1 – What is Linux Kernel?
Kernel is the core system code, which manages the system resources and works as a bridge between Hardware and Software.
#2 – How to choose Linux Kernel version?
While booting, you see the grub, in which you have to choose the “Advanced options for” option and select the preferred Kernel version.
Conclusion
It’s very easy to find the kernel version of the Linux distribution that you are using. It works perfectly fine with all of the Linux Distros. I’ve used these commands on the Zorin OS, which is based on the Ubuntu. If one command does not work in your case, you can surely use the other three commands that I’ve shared.
As usual, it’s time to wrap up everything. If you are facing any issues, hit me up in the comments and I’ll surely help yo.
Living my dream of using Linux on the PC. Been a Linux user from last 5 years and love tinkering with features. Taking a challenge of reading two books per month.
Leave a Reply
You must be logged in to post a comment.