Upgrading the kernel on your AlmaLinux 9 system is a vital maintenance task that enhances your system’s security and performance. This guide provides a streamlined set of commands for upgrading the kernel. Follow these steps to execute the upgrade smoothly.
🔐 Prerequisites:
- Logged in as a user with sudo privileges.
- Backup your important data.
- Acknowledge the risks involved with a kernel upgrade.
🚀 Upgrade Steps:
- Check Your Current Kernel Version:
uname -r
- Enable ELRepo Repository:
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org sudo dnf install https://www.elrepo.org/elrepo-release-9.el9.elrepo.noarch.rpm
- Install the New Kernel:
- Install the Latest Mainline Kernel:
sudo dnf --disablerepo="*" --enablerepo="elrepo-kernel" list available sudo dnf --enablerepo=elrepo-kernel install kernel-ml
- Install the Latest Long-Term Support Kernel:
sudo dnf --disablerepo="*" --enablerepo="elrepo-kernel" list available | grep lt sudo dnf --enablerepo=elrepo-kernel install kernel-lt
- Install the Latest Mainline Kernel:
- Update the GRUB Configuration:
sudo grubby --default-kernel sudo grubby --set-default /boot/vmlinuz-{your_kernel_version}
- Reboot and Verify:
sudo reboot
After rebooting, check the kernel version again:
uname -r
🔍 Final Checks:
- Ensure all services are running as expected.
- Monitor the system for any unusual behavior.
✅ Congratulations! You have successfully upgraded your AlmaLinux 9 kernel to the latest version.