How to Install Linux Kernel 5.19 on Fedora 36 Linux

Advertisement

Linux 5.19 has been released, and it includes several notable improvements. For example, networking support has been improved, and all-important security fixes have been made, and more. In addition, the release includes new features and capabilities, such as better support for AMD and Apple hardware and improved power management on laptops.

Most users may not be required to update to Linux Kernel 5.19 immediately, but for users seeking better performance on existing hardware or having new hardware that their current kernel does not support or has relatively low support, then upgrading immediately would be beneficial. If your system is running fine and you are happy, do not pre-upgrade your kernel and wait for the official release in Fedora.

An excellent resource for users wanting to see the Linux Kernel 5.19 is visiting the Kernel Newbie changelog.

In the following tutorial, you will learn how to install the latest 5.19 Linux Kernel on Fedora 36 Server or Workstation using the Linux Vanilla third-party repository that is well known or using Fedora’s upstream, along with how to downgrade back to the original Fedora kernel if you run into issues.

Update Fedora

First, ensure your system is up-to-date using the following command below; this is essential when installing kernels.

Advertisement

sudo dnf upgrade --refresh -y

Next, you have two choices. Using the Fedora upstream method is probably more recommended but often not as quickly updated as the Vanilla Kernel repo, but for most users, that kernel should work very well.

Install Linux Kernel 5.19 – Fedora Method

Users that do not want to use third-party kernels, often using the upstream latest bleeding edge kernel from the Fedora team, maybe a more desirable choice as these are designed to work with Fedora.

Advertisement

First, run the following command to install the Fedora Rawhide upstream. Do not worry; your packages will not all switch to the upstream. You still need to enable them to use the upstream; additionally, you can do the same for other packages if you desire.

sudo dnf install fedora-repos-rawhide -y

Now, let’s check what packages are available for the Linux Kernel from the Rawhide repository.

sudo dnf --enablerepo=rawhide info kernel

Example output:

How to Install Linux Kernel 5.19 on Fedora 36 Linux

As above, Linux Kernel 5.19 is available; now, run the following command to upgrade.

Advertisement

sudo dnf upgrade kernel* --enablerepo=rawhide

Example output:

How to Install Linux Kernel 5.19 on Fedora 36 Linux

Type Y, then press the ENTER KEY to proceed.

Once done, reboot your system.

reboot

Once back, verify the kernel version installed.

Advertisement
cat /proc/version
How to Install Linux Kernel 5.19 on Fedora 36 Linux

Users that prefer pretty terminal outputs install neofetch.

sudo dnf install neofetch -y

Then use neofetch to print out your system specs and confirm your installed kernel.

Advertisement

neofetch

Example output:

How to Install Linux Kernel 5.19 on Fedora 36 Linux

Congratulations, you have installed Linux Kernel 5.19 using Fedora upstream.

Install Linux Kernel 5.19 – Linux Vanilla Kernel Method

Import Linux Vanilla Kernel Repo

Fedora often is up to date with the latest stable kernels. Usually, you will find upgrade kernels from Fedora in the testing repository or rawhide for future kernels, but they do not release overnight, even by Fedora’s standards.

For users that would like a quicker turnaround with using an RPM and not using the alternative XanMod or Liquorix type kernels or compiling your own, which for some users may be too complex or too time-consuming, the Linux Vanilla repo is often up to date with stable and mainline kernels and is well known.

Use the following command to import the repository on your Fedora 36 system.

curl -s https://repos.fedorapeople.org/repos/thl/kernel-vanilla.repo | sudo tee /etc/yum.repos.d/kernel-vanilla.repo

If the command fails, you likely need to install the curl package, which you can do with the following command.

Advertisement
Advertisement

sudo dnf install curl -y

Install Linux Kernel 5.19

Currently, Linux Kernel 5.19 is featured on the stable branch. To begin the installation, use the following command.

sudo dnf config-manager --set-enabled kernel-vanilla-stable

Use the following command to set the stable repository for a higher priority than the default kernel repository.

sudo dnf config-manager --save --setopt="kernel-vanilla-stable.priority=99"

Confirm that the priority was added.

grep priority /etc/yum.repos.d/kernel-vanilla.repo

Example output:

priority=99

None of the other repositories should have any priorities set by default, so you know the repository setup is successful if this is present.

Now install/upgrade the Linux kernel.

Advertisement

sudo dnf upgrade kernel kernel-core kernel-modules kernel-modules-extra --refresh

Example output:

How to Install Linux Kernel 5.19 on Fedora 36 Linux

Type Y, then press the ENTER KEY to proceed.

Advertisement

Once done, reboot your system.

reboot

Once back, verify the kernel version installed.

cat /proc/version

Example output:

How to Install Linux Kernel 5.19 on Fedora 36 Linux

Users that prefer pretty terminal outputs install neofetch.

Advertisement

sudo dnf install neofetch -y

Then use neofetch to print out your system specs and confirm your installed kernel.

neofetch

Example output:

How to Install Linux Kernel 5.19 on Fedora 36 Linux

Congratulations, you have installed the latest Linux Kernel, 5.19.

How to Restore Fedora Default Kernel

Remove Linux Kernel Vanilla

The below steps will show you a method to remove the installed third-party kernels and restore the default Fedora kernel. There may be other alternative ways, and this method will work as shown below.

Advertisement

First, disable the enabled Linux Vanilla repository.

sudo dnf config-manager --set-disable kernel-vanilla-stable

Next, remove the Linux Vanilla repo.

Advertisement

sudo rm /etc/yum.repos.d/kernel-vanilla.repo

Remove Linux Kernel 5.19 – Both Methods

Next, use the downgrade command to return to the Fedora Kernel.

sudo dnf downgrade kernel*

Alternatively, you could use the install command, but downgrade is preferred, but it is up to you.

Next, reboot your system.

reboot

Once logged back in, verify the installed kernel using the cat command again.

cat /proc/version

Example output:

How to Install Linux Kernel 5.19 on Fedora 36 Linux

As above, you have rolled back fully to the original kernel 5.17, which is outdated but follow the steps below to remove unused kernels and update to the latest default stable version.

Advertisement
Advertisement

Now that you have restored the Fedora kernel, list the kernels present on Fedora that are installed and not in use.

dnf list kernel

Example output:

Use the following command to remove both unused kernels.

sudo dnf --setopt=protected_packages= remove $(rpm -q kernel-core | grep -v $(uname -r))

Do not forget to reboot.

reboot

Another good command to run distro-sync. The command is good for removing large or core level packages such as kernels and getting your Fedora system back on track.

sudo dnf distro-sync -y

From here, you have restored the default kernel. Ideally, updates from the Fedora updates stream will be available. From here, you can update your system back to the state of Fedora’s release, there are other ways to restore kernels, but for newer users, this is often the easiest and safest, in my opinion.

Advertisement

Run a quick dnf upgrade to ensure your default kernel is up-to-date.

sudo dnf upgrade

Comments and Conclusion

The tutorial taught you how to install the latest Linux Kernel 5.19 on Fedora 36 Server or Workstation. Ideally, it would be best if you only used these on machines without hardware support. Sometimes kernels of this nature can bring in inconsistencies with Fedora on the odd occasion, but ensure you have backups of anything imported when installing or downgrading kernels.

Share on: