Original source
By default, all installed Linux kernels and related files are stored in the /boot directory. Just use the find command to see the list of installed kernels:
$ <span class="token function">find</span> /boot/vmli* /boot/vmlinuz /boot/vmlinuz-5.4.0-64-generic /boot/vmlinuz-5.4.0-65-generic /boot/vmlinuz.old
As you can see in the previous output, I have two Linux kernel versions installed on my Ubuntu desktop machine (5.4.0-64 and 5.4.0-65).
Now we will see distribution-specific ways to find out installed Linux kernel details. First, let's start with AlpineLinux.
Detecting installed kernels in AlpineLinux
We can use the following apkinfo-vv|greplinux command to detect all installed kernels and their versions, such as:
$ apk info -vv <span class="token operator">|</span> <span class="token function">grep</span> linux libblkid-2.32-r0 - Block device identification library from util-linux linux-virt-4.14.167-r0 - Linux vanilla kernel syslinux-6.04_pre1-r1 - Boot loader <span class="token keyword">for</span> the Linux operating system
List the installed kernels in ArchLinux
To see everything installed in ArchLinux and its variants (such as ManjaroLinux) To see what system linux is , run the following pacman-Qlinux command:
$ pacman -Q linux linux <span class="token number">5.9</span>.14.arch1-1
You can also combine the pacman and grep commands to list the installed kernel versions:
$ pacman -Q <span class="token operator">|</span> <span class="token function">grep</span> linux archlinux-keyring <span class="token number">20201210</span>-1 linux <span class="token number">5.9</span>.14.arch1-1 linux-api-headers <span class="token number">5.8</span>-1 util-linux <span class="token number">2.36</span>.1-4 util-linux-libs <span class="token number">2.36</span>.1-4
As shown aboveCheck what system linux is, there is only one Linux kernel in the ArchLinux system Introduction to the linux system, its version is 5.9.14
Find installed Linux kernels in Debian, Ubuntu, Pop!_OS
In Debian and other Debian-based systems (such as Ubuntu, Pop!_OS, LinuxMint) suse linux download, we can find the list of all installed kernels using the dpkg command:
$ dpkg --list <span class="token operator">|</span> <span class="token function">grep</span> linux-image iilinux-image-5.4.0-64-generic <span class="token number">5.4</span>.0-64.72 amd64Signed kernel image generic iilinux-image-5.4.0-65-generic <span class="token number">5.4</span>.0-65.73 amd64Signed kernel image generic iilinux-image-generic<span class="token number">5.4</span>.0.65.68 amd64Generic Linux kernel image
View Fedora, CentOS, RHEL, AlmaLinux to view the installed kernel
In RPM-based systems, such as Fedora and its downstream versions, such as CentOS, RHEL and RHEL-clone, such as AlmaLinux, we can use the rpm-qakernel or rpm-qa|grep-ikernel command to view all installed Kernel
Fedora33:
$ <span class="token function">rpm</span> -qa <span class="token operator">|</span> <span class="token function">grep</span> -i kernel kernel-core-5.8.15-301.fc33.x86_64
AlmaLinux8.3:
List all installed LinuxKernels in openSUSE
Because openSUSE is also an RPM-based system, the rpm-qa|grep-ikernel command can also be used in this system to enumerate the kernel
Only view detailed information about the current kernel
You can view the currently running kernel through uname-r or uname-mrs
$ <span class="token function">uname</span> -r <span class="token number">5.4</span>.0-65-generic $ <span class="token function">uname</span> -mrs Linux <span class="token number">5.4</span>.0-65-generic x86_64
The above is the detailed content of All installed Linux kernels and their associated files are stored in Alpine. For more information, please follow other related articles on the PHP Chinese website!