How to list or check installed Linux kernels using command line

https://w‮al.ww‬utturi.com
How to list or check installed Linux kernels using command line

To list or check the installed Linux kernels on a system using the command line, you can use the ls command to list the files in the /boot directory, or the uname command to display the currently running kernel version.

  1. To list the installed Linux kernels, use the ls command to list the files in the /boot directory:
ls /boot

The output will list the files in the /boot directory, including the Linux kernel image files (usually named vmlinuz-*).

  1. To check the currently running kernel version, use the uname command with the -r option:
uname -r

The output will display the version of the currently running kernel.

For example:

$ ls /boot
config-4.19.0-9-amd64  initrd.img-4.19.0-12-amd64  System.map-4.19.0-9-amd64  vmlinuz-4.19.0-12-amd64
config-4.19.0-9-amd64.dpkg-bak  initrd.img-4.19.0-9-amd64  System.map-4.19.0-12-amd64  vmlinuz-4.19.0-9-amd64
config-4.19.0-12-amd64  initrd.img-4.19.0-9-amd64.old  System.map-4.19.0-9-amd64.dpkg-bak  vmlinuz-4.19.0-9-amd64.old

$ uname -r
4.19.0-12
Created Time:2017-10-28 21:39:05  Author:lautturi