List or Check Installed Linux Kernels using command line

How do I list all installed kernel on Linux operating system? How do I find out current kernel version?

You can use standard package listing command to list installed Linux kernels on your Linux operating systems. This page shows how to list kernel using the command line.
Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Linux command-line
Est. reading time 1m

List or Check Installed Linux Kernels

The command varies from one Linux distribution to another. In other words, you need to type the command as per your Linux distro.

RedHat / CentOS / RHEL / Fedora Linux user

You need to use standard rpm command or yum command to list installed software. Type the following command at shell prompt:
$ rpm -qa kernel
Sample Outputs:


Here is another outputs from RHEL 8 server:


One can run the yum command/dnf command as follows:
yum list installed kernel
dnf list installed kernel

List Installed Linux Kernels

Listing installed kernels on RHEL 8

To list / display current running kernel version

Type the following uname command:
$ uname -r
$ uname -mrs

Sample outputs:

Linux 2.6.18-8.1.14.el5 x86_64

Another outputs from my Ubuntu Linux 18.04 LTS desktop

uname -r

Find installed kernel version for Debian / Ubuntu / Pop!_OS Linux

Use the dpkg command along with the grep command to list all installed kernel on your Debian or Ubuntu Linux, enter:
$ dpkg --list | grep linux-image
Sample outputs:

ii  linux-image-2.6.20-15-generic        2.6.20-15.27                           Linux kernel image for version 2.6.20 on x86/
ii  linux-image-2.6.20-16-generic        2.6.20-16.32                           Linux kernel image for version 2.6.20 on x86/
ii  linux-image-generic                                 Generic Linux kernel image

Let us see outputs from my Ubuntu Linux 18.04 LTS desktop:
List Installed Kernels and Currently Running Kernel

Arch Linux user

Run the pacman command as follows:
pacman -Q | grep linux

SUSE Enterprise Linux or openSUSE Linux user

Execute the following rpm command:
rpm -qa | grep -i kernel
From my OpenSUSE 15.2 server:


How do I find manually compiled and installed kernels that aren’t in the package manager?

Try to locate them in /lib/modules/ directory using the ls command:
ls -l /lib/modules/

total 12
drwxr-xr-x 5 root root 4096 Jul 29 17:53 4.15.0-55-generic
drwxr-xr-x 5 root root 4096 Jul 29 22:05 4.18.0-25-generic
drwxr-xr-x 5 root root 4096 Aug  1 17:19 5.0.0-23-generic

Alpine Linux user

Run the apk command:
# apk info -vvv | grep -E 'Linux' | grep -iE 'lts|virt'
And we will see:

linux-virt-5.4.84-r0 - Linux lts kernel

How do I list custom compiled kernel?

Use the following find command:
sudo find /boot/ -iname "vmlinuz*"
Here is what I see:

[sudo] password for vivek: 

Please note that vmlinuz is the name of the Linux kernel executable. Typically stored in /boot/ directory. The vmlinuz is a compressed Linux kernel file. It is a bootable file for loading the Linux operating system into memory. On some older Linux distros including latest one, you may find another file called vmlinux. It 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 issuing the following command:
sudo make install
The kernel binary on the original UNIX operating system was called unix. When a new Unix kernel containing support for virtual memory was finally written at the University of California at Berkeley, the kernel binary was called vmunix. Hence, the Linux kernel binary is also known as vmlinuz.


You learned how to list installed Kernels version using a bash shell prompt. See how to compile Linux kernel for more information or visit official Linux kernel website here.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 11 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
11 comments… add one
  • Alamgir Jun 12, 2009 @ 12:53

    thanks ! important information.

  • krishan kumar singh Oct 7, 2009 @ 17:37


    it’s working thanks for information


    krishan kumar singh

  • jaydeep Jul 19, 2010 @ 9:10

    hey that works for Ubuntu…!

  • visitor Sep 4, 2013 @ 19:43


    how to edit the boot order manually in Debian to choose a specific installed kernel to be the default one?


    • Erathiel Jan 16, 2014 @ 8:32

      You need to modify the bootloader configuration. If you haven’t been playing with your installation you’re using GRUB, so search for GRUB configuration tutorials.

      • visitor Jan 16, 2014 @ 9:12

        I just want to know the grub.cnfg path to edit it in Debian.

  • rohit Jul 28, 2014 @ 8:54

    hi, i am new to linux. i want to know what happens to the older kernel when i install a new kernel? does it overwrite? also explain me how do i find the path/location for both older and newer kernels! please help!

    • Fernando Sep 1, 2014 @ 15:30

      @rohit, newer installed kernels do not overwrite existing kernels unless you delete them explicitly. So you can always choose to boot with the proved old one :-)
      As for the kernels location, it depends on where do you install them… In my case I always create a /boot partition, so there you could find all those kernels…
      Best of luck!

  • Wyatt Feb 18, 2015 @ 15:19

    What if you have manually compiled and installed kernels that aren’t in the package manager?

    • Panday Feb 28, 2021 @ 16:48

      Have you try out?
      ls -l /boot/vmlinuz*

  • Shraddha Jul 10, 2015 @ 18:22

    Thanks for posting this! Helpful

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum