Think of the Linux kernel as the central/core brain of the operating systems. It effectively handles computer resources and ensures that hardware and software work well together without any hassles. It is also responsible for ensuring smooth and secure operations. While looking at the advantages of the Linux kernel, it becomes clear how crucial it is for users to know which Linux kernel version they are using on their computers.
This post illustrates several methods of checking the Linux Kernel version on Ubuntu 22.04.
How to Check/Get Linux Kernel Version on Ubuntu 22.04?
Ubuntu supports various methods to check/get the Linux Kernel version. Among these methods, the following are the most commonly used:
- Method 1: Using “uname” Command
- Method 2: Using “dmesg” Command
- Method 3: Using “/proc/version” File
Method 1: How to Check Linux Kernel Version Using Uname Command?
To check Linux Kernel version on Ubuntu 22.04, first, open the terminal by pressing “Ctrl+Alt+T”. Then, type in the following command in the terminal window:
Upon executing the stated command, you will see the following output:
Here in the above output:
- The leftmost “5” represents the “Kernel version”.
- The “15” after the fractional point represents “Major revision”.
- The “0” indicates “Minor revision”.
- The “58” depicts “Bug fix”.
- The term “generic” is a general identifier that shows the distribution. For Ubuntu, it signifies the desktop version, while in the case of the Ubuntu server edition, it would be referred to as “server.”
Method 2: How to Check Linux Kernel Version Via the “dmesg” Command?
The “dmesg” command is used to show the kernel messages on Linux and other Unix-like operating systems. Execute the “dmesg” command along with the “grep Linux” command to get information related to Linux kernel version on Ubuntu 22.04:
dmesg |grep Linux
The output snippet indicates that executing the stated “dmesg” command lead us to an unexpected error, indicating that the operation requires read permissions:
Executing the command provided below, non-root users will be able to access and view kernel messages using the “dmesg” command:
sudo sysctl kernel.dmesg_restrict=0 kernel.dmesg_restrict = 0
Now, execute the following command to get information related to Linux kernel version on Ubuntu 22.04:
dmesg | grep Linux
Method 3: How to Check Linux Kernel Version Using “/proc/version” File?
Another easy and convenient method to get the Linux kernel version on Ubuntu 22.04 is by checking the contents of the “/proc/version” file:
The output shows that the stated command retrieves the details about the Linux kernel version, such as the version number, compilation date, and distribution name:
That’s all about checking the Linux kernel version on Ubuntu 22.04.
To check Linux Kernel version on Ubuntu 22.04, the “uname” command, the “dmesg” command, and the “/proc/version” file is used. These methods retrieve the details about the Linux Kernel version, such as the version number, compilation date, and distribution name. This post has covered various methods of checking Linux Kernel Version on Ubuntu 22.04.