Check Installed Linux Kernel in Command Line | 7 Easy Steps

In this guide on the Orcacore website, we want to teach you How to Check Installed Linux Kernel in Command Line. Find or display installed Linux kernels from CLI.

A kernel is the core part of Linux. It is responsible for all major activities of this operating system. It consists of various modules and it interacts directly with the underlying hardware. The kernel provides the required abstraction to hide low-level hardware details in system or application programs.

Steps To Check Installed Linux Kernel in Command Line

You can easily use Linux commands to list your installed Linux Kernels. To do this, follow the steps below to see how it works on different Linux distros including RHEL, Debian, Ubuntu, Arch Linux, etc.

1. Check the Current Linux Kernel Version

If you want to check your current Kernel version, you can simply use the following command:

# uname -r
# uname -mrs
Check the Current Linux Kernel Version

2. Find Linux Kernel on Centos / RHEL / RedHat / Fedora

On these Linux distros, you can simply use the following commands to list your installed kernels:

rpm -qa kernel

Example output:

Find Linux Kernel on Centos / RHEL / RedHat / Fedora

Or you can use yum and dnf to check your installed kernel:

# yum list installed kernel
Or
# dnf list installed kernel

You can follow this link to see the differences between YUM and DNf.

3. Find Linux Kernel on Debian / Ubuntu

If you are an Ubuntu or Debian Linux user, you can easily use the following command to list your installed kernels:

dpkg --list | grep linux-image

Example Output:

Find Linux Kernel on Debian / Ubuntu

4. Find Linux Kernel on Arch Linux

If you are an Arch Linux user, to list your installed kernels, you can use the following command:

pacman -Q | grep linux

5. Find Linux Kernel on OpenSUSE Linux

To see the installed kernels on OpenSUSE, you can use the commands below:

# rpm -qa | grep -i kernel
Or
# zypper search -i kernel

6. Find Installed Linux Kernels that are not in the Package Manager

You can list your kernels that aren’t in the package manager by locating them in the /lib/modules/ directory using the ls command:

ls -l /lib/modules/

7. Find Custom Compiled Linux Kernel

vmlinuz is the name of the Linux kernel executable. vmlinuz is a compressed Linux kernel, and it is capable of loading the operating system into memory so that the computer becomes usable and application programs can be run.

To find the custom-compiled kernel, you can use the following command:

sudo find /boot/ -iname "vmlinuz*"

It is also the kernel file but in a non-compressed and non-bootable format. To list files in /boot/ run the ls command:

ls -l /boot/

The Linux kernel is compiled by running the following command:

sudo make install

Conclusion

At this point, you have learned to Check or Find Installed Linux Kernels in the command line. Finding installed Linux kernels helps manage system stability, security, and compatibility. It allows updating, troubleshooting, or removing old kernels as needed.

Hope you enjoy it. Please subscribe to us on Facebook, Instagram, and YouTube.

You may also like to read these articles:

How To Upgrade Linux Kernel on Centos 7

Upgrade Linux Kernel on Rocky Linux 8

Upgrade Linux Kernel on Ubuntu 22.04

Linux kernel 6.14 Features and Release Date

Remove Old Linux Kernels on AlmaLinux

Share your love

Stay informed and not overwhelmed, subscribe now!