How to Change the Default Kernel on Fedora
We will use grubby — a command line tool used to modify bootloader configuration files, to check and change the default kernel on Fedora.
Install grubby
We can install grubby if it isn’t already present:
1 | sudo dnf install grubby |
List all installed kernels
To get the index number of all the installed kernels:
1 | sudo grubby --info=ALL | grep -E "^kernel|^index" |
The output should be something like this:
1 | index=0 |
Change the default kernel using index
Now we can change the default kernel by using the index number:
1 | sudo grubby --set-default-index=1 |
Verify the default kernel
Verify that the right kernel has been set as default:
1 | sudo grubby --default-title |
The output will be the default kernel title:
1 | Fedora Linux (5.15.10-lqx1.0.fc35.x86_64) 35 (Workstation Edition) |
How to Change the Default Kernel on Fedora