Skip to content

How to Check the Kernel Version of a Linux System

  • by

The Linux kernel is the core of any Linux-based operating system, managing hardware and system resources. Sometimes, you need to check which kernel version your system is running—whether for troubleshooting, compatibility checks, or just out of curiosity.

There are several ways to check the Linux kernel version, and while most distributions follow the same methods, some have distro-specific variations. In this guide, we’ll go through different ways to check your kernel version, covering Ubuntu, Debian, Fedora, Arch Linux, and more.


Method 1: Using the uname Command (Works on All Distros)

The uname command is the simplest way to check your kernel version.

Command:

uname -r

Example Output:

6.1.0-12-amd64

Here, the output tells us that the system is running Linux kernel version 6.1.0-12, compiled for a 64-bit (amd64) architecture.

  • If you need more details, use:bashCopyEdituname -a This provides additional information like the hostname, OS type, and compile date.

Method 2: Checking /proc/version (Works on All Distros)

The /proc directory contains system-related information, and the version file stores kernel details.

Command:

cat /proc/version

Example Output:

Linux version 5.15.0-91-generic (buildd@lcy02-amd64-060) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #101-Ubuntu SMP Fri Jan 5 18:19:37 UTC 2024

This output provides not just the kernel version (5.15.0-91-generic) but also details about the compiler and build date.


Method 3: Using the hostnamectl Command (Best for Systemd-Based Distros)

For distributions using systemd (such as Ubuntu, Fedora, Debian, and Arch), you can use hostnamectl.

Command:

hostnamectl | grep Kernel

Example Output:

Kernel: Linux 6.5.2-arch1-1

This method is particularly useful on newer distributions that rely on systemd.


Method 4: Using rpm or dpkg (Distro-Specific Package Managers)

Some distros manage kernel packages through their package manager.

For RPM-based Distros (Fedora, CentOS, RHEL):

rpm -q kernel

Example Output:

kernel-5.14.0-362.8.1.el9_3.x86_64

For Debian-Based Distros (Ubuntu, Debian, Linux Mint):

dpkg --list | grep linux-image

Example Output:

ii  linux-image-6.2.0-1014-oem             6.2.0-1014.14               amd64        Signed kernel image oem

This method lists all installed kernels, not just the currently running one.


Method 5: Using neofetch or screenfetch (For a More Visual Approach)

If you have neofetch or screenfetch installed, you can use these tools for a graphical summary.

Example Command:

neofetch

Example Output (trimmed to show the kernel line):

Kernel: 6.1.7-200.fc37.x86_64

This is a user-friendly way to check your kernel version along with system details.


Checking Kernel Version on Specific Distributions

Ubuntu/Debian/Linux Mint:

All the methods above work, but the most common ones are:

uname -r
hostnamectl

Fedora/CentOS/RHEL:

Since Fedora and RHEL-based systems use RPM, checking via rpm is useful:

rpm -q kernel

Arch Linux/Manjaro:

Since Arch is a rolling-release distro, users often want to check both the current and installed kernel versions:

uname -r
pacman -Q linux

For installed kernels:

ls /usr/lib/modules/

Final Thoughts

No matter which Linux distribution you’re using, there are multiple ways to check your kernel version. The uname -r command is the quickest and works everywhere, but distro-specific tools like rpm, dpkg, and pacman provide additional insights.

Need to update your kernel? Check your distro’s documentation for the safest upgrade method.

check linux kernel

How to Check the Kernel Version of a Linux System

The Linux kernel is the core of any Linux-based operating system, managing hardware and system resou…

reactos

ReactOS: A Free and Open-Source Windows-Compatible Operating System

ReactOS is a unique operating system that aims to provide a free and open-source alternative to Micr…

AI Operating System

OpenDAN: Your Personal Open-Source AI Operating System

In the rapidly evolving landscape of artificial intelligence (AI), the demand for personalized and p…