How to Install and Manage Multiple Kernels on Arch Linux

0

Arch Linux allows installing a wide variety of Linux kernels in addition to the stable kernel. You can install four officially supported Linux kernels and eleven unofficial kernels per your requirements.

Here, we will see how to install and manage multiple kernels on Arch Linux.

Install Linux Kernels on Arch Linux

Stable kernel

This kernel is the primary and stable kernel installed on your system by default.

pacman -Sy linux linux-headers

LTS kernel

This kernel is long-term-supported and will be supported until the end of October 2023.

pacman -Sy linux-lts linux-lts-headers

Hardened kernel

This kernel mainly focuses on security parameters by applying hardening patches to mitigate kernel and userspace exploits.

pacman -Sy linux-hardened linux-hardened-headers

Zen kernel

This kernel provides better performance than the stable kernel.

pacman -Sy linux-zen linux-zen-headers

After installing the Linux kernels on Arch Linux, regenerate the grub.cfg file with the below command.

grub-mkconfig -o /boot/grub/grub.cfg

Then, reboot your system.

reboot

Boot Right Linux Kernel on Arch Linux

In the Arch Linux GRUB Menu, select Advanced options for Arch Linux and then press enter.

By default, the GRUB groups installed kernels in a submenu, which is why you will not be able to see multiple kernel entries in the main grub menu itself.

READ: How to disable GRUB submenu on Arch Linux

GRUB Menu on Arch Linux
GRUB Menu on Arch Linux

Now, you can choose the kernel you want your system to boot from.

GRUB Menu Under Advanced Options
GRUB Menu Under Advanced Options

Remove Linux Kernels on Arch Linux

In case you do not wish to have specific kernels, use the pacman command to remove them.

# Stable kernel

pacman -Rsu linux linux-headers

# LTS kernel

pacman -Rsu linux-lts linux-lts-headers

# Hardened kernel

pacman -Rsu linux-hardened linux-hardened-headers

# Zen kernel

pacman -Rsu linux-zen linux-zen-headers

After removing the Linux kernels on Arch Linux, regenerate the grub.cfg with the below command.

grub-mkconfig -o /boot/grub/grub.cfg

Then, reboot your system.

reboot

Conclusion

That’s All. I hope you learned how to install and manage multiple kernels on Arch Linux.

You might also like