Checking your Linux Kernel Version: Once your up and running with your favorite Linux distribution, you might find the need to install additional software packages or drivers. Some of these software applications or drivers can be specific to a Linux Kernel in which case you will need to find this information. Finding the Kernel Version, Release information and Operating System from a running system is fairly straight forward and can be done directly from a terminal.
Locating your Linux Kernel Version
You can find the Linux kernel version on your Linux system using various methods. Here are three common ways to do it:
Using the uname command
One of the most frequently used methods for obtaining the Linux Kernel version is by utilizing the uname command. In addition to simply displaying the kernel version, various uname options allow you to retrieve different pieces of information about the kernel and operating system, providing valuable insights into your system's configuration.
To get started, open up a terminal and type one of the following uname commands listed below and then press enter:
uname -a
(prints all information) - This command prints all available system information. This includes the kernel name, network node hostname, kernel release, kernel version, machine hardware architecture, and the operating system.
uname -r
(prints the kernel release) - Prints the kernel release. The kernel release represents the version of the kernel without including any additional information. For example, the output could look like this 5.0.0-07-generic.
uname -v
(prints the kernel version) - Prints out the kernel version. It includes additional details beyond just the version number, potentially providing more context about the specific build or release of the kernel.
uname -o
(prints the operating system) - Prints out the name of the operating system. This can be particularly useful if you're on a system that is running a variant or distribution of Linux that uses a specific name for the operating system.
Checking the /proc/version File
Another way to find the kernel version is by reading the /proc/version file. To do this, type the following command from an open terminal:
cat /proc/version
The output should contain information about the kernel version along with other related details.
Using the hostnamectl command
On systemd-based Linux distributions like Ubuntu, you can use the hostnamectl command to display system information, including the kernel version. To use this method, simply run the following command:
hostnamectl
Look for the "Kernel" entry in the output, which will show the kernel version.
Any of these methods should help you easily find the Linux kernel version on your system.