List or Check Installed Linux Kernels

Posted on in Categories , , , , , last updated October 11, 2007

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

A. You can use standard package listing command to list installed kernels.

RedHat / CentOS / RHEL / Fedora Linux user

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

kernel-2.6.18-4.1.15.el5
kernel-2.6.18-8.1.14.el5
kernel-2.6.18-8.1.10.el5

To list / display current kernel

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

Output:

Linux 2.6.18-8.1.14.el5 x86_64

Debian / Ubuntu Linux user

Use dpkg command to list all installed kernel, enter:
$ dpkg --list | grep linux-image
Output:

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                  2.6.20.16.28.1                         Generic Linux kernel image

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

10 comment

  1. 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!

    1. @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!

Leave a Comment