For users of Fedora, most packages are almost up to date with what is present and classed as stable. However, when it comes to Kernels, users often may want to try the latest release candidate without switching to Fedora Rawhide and having an unstable system. With Fedora becoming more popular and mainstream, newer users do not realize you can enable the Fedora repository and install upcoming release candidates constantly being updated by the Fedora team.
In the following small tutorial, you will learn how to install the Latest Linux Kernel from the Fedora Rawhide repository on your Fedora 35 Workstation or Server.
Table of Contents
Prerequisites
- Recommended OS: Fedora Linux 35.
- User account: A user account with sudo or root access.
Update Operating System
Update your Fedora operating system to make sure all existing packages are up to date:
sudo dnf upgrade --refresh -y
The tutorial will be using the sudo command and assuming you have sudo status.
To verify sudo status on your account:
sudo whoami
Example output showing sudo status:
[joshua@fedora ~]$ sudo whoami
root
To set up an existing or new sudo account, visit our tutorial on Adding a User to Sudoers on Fedora.
To use the root account, use the following command with the root password to log in.
su
Install Dependency Required
Before you proceed with the installation, run the following command to install or check that the package dnf-plugins-core is installed on your Fedora desktop.
sudo dnf install dnf-plugins-core -y
By default, this should be installed.
The tutorial will utilize the terminal, which can be found in your show applications menu.
Example:
Install Fedora Rawhide Repository
Before you continue, you need to install the Fedora Rawhide repository. To do this, use the following command.
sudo dnf install fedora-repos-rawhide
Example output:
Type Y, then press ENTER KEY to proceed.
Optionally, run a quick sync update on your dnf cache.
sudo dnf update --refresh
Optionally, to remove the Fedora Rawhide repository if you have no more use for it.
sudo dnf remove fedora-repos-rawhide
Install Latest Linux Kernel – Fedora Workstation or Server
First, one of the most sought-after features is testing the newest Linux Kernel. At the time of this tutorial, Linux Kernel 5.16 had just been released, and Linux Kernel 5.17 is now in its first release candidate.
In time, this will change, but you do not need to do anything extra. When new kernel releases are out, the Fedora team quickly gets an update out.
First, run the following command to check Linux Kernel version are available to update.
sudo dnf --enablerepo=rawhide info kernel
Example output:
As above, 5.17 is available at this time.
To begin the installation, run the following command.
sudo dnf upgrade kernel* --enablerepo=rawhide
Example output:
Type Y, then press the ENTER KEY to proceed.
During the installation process, you will be alerted to import the GPG key for the packages.
Example:
Type Y then press the ENTER KEY to complete the installation
Once the installation is complete, reboot your system.
sudo reboot
Next, check the kernel version installed when you have logged back in.
uname -r
Example output:
5.17.0-0.rc0.20220112gitdaadb3bd0e8d.63.fc36.x86_64
As above, you have installed the latest Linux kernel.
Alternative – Upgrade Packages from Fedora Testing
For users that find Rawhide too risky, another option to get advanced copies of updated packages is to update all or specific packages from the Fedora testing repository. These packages are often much more stable than Rawhide, and you can contribute to the Fedora community and team by voting on packages with karma.
First, make sure your system is up to date, then run the following command to blanket check all packages for updates from Fedora’s testing repository.
sudo dnf update --enablerepo=updates-testing
Example output:
As above, you can then update all packages using the following command.
sudo dnf update --enablerepo=updates-testing
For specific packages, which is more preferred to keep your Fedora 35 system as stable as possible, install the particular package from the list you want to install to have the latest update.
sudo dnf upgrade {package-name} --enablerepo=updates-testing
Example upgrading latest Linux Kernel from Testing:
sudo dnf upgrade kernel* --enablerepo=updates-testing
Comments and Conclusion
In the tutorial, you have learned how to install either or both from Fedora Rawhide, the latest Linux Kernel. Make sure you install these with backups in mind for any serious files or data you cannot afford to lose and do not be surprised if issues can occur. Users wanting to test out and try the latest goodies or Linux Kernel cases get support for newly released hardware, which can be a great option.
Note, careful installing unstable kernels on servers or workstations, as significant as the new features may be, with anything not classed as stable, bugs can occur that can crash or compromise your system. One of the great options with Fedora and RHEL-type families is that you can reboot your system and select a stable kernel in the boot screen if the testing kernel is buggy.