From Fedora Project Wiki
No edit summary
No edit summary
 
Line 20: Line 20:
-------------------------------------
-------------------------------------


Now we can change the default kernel by using the index number:
Now we can change the default kernel by using the index number (This change is valid till the next update of a newer kernel):


  sudo grubby --set-default-index=1
  sudo grubby --set-default-index=1

Latest revision as of 12:04, 19 December 2024

List all installed kernels


To get the index number of all the installed kernels:

 sudo grubby --info=ALL | grep -E "^kernel|^index"

The output should be something like this:

index=0 kernel="/boot/vmlinuz-6.11.11-200.fc40.x86_64" index=1 kernel="/boot/vmlinuz-6.11.10-200.fc40.x86_64" index=2 kernel="/boot/vmlinuz-6.11.8-200.fc40.x86_64" index=3 kernel="/boot/vmlinuz-0-rescue-6a0d0e8a953c43e682bd4f1a6e0143be"

Change the default kernel using index


Now we can change the default kernel by using the index number (This change is valid till the next update of a newer kernel):

sudo grubby --set-default-index=1

Verify the default kernel


Verify that the right kernel has been set as default:

  sudo grubby --default-title

The output will be the default kernel title:

Fedora Linux (6.11.10-200.fc40.x86_64) 40 (Workstation Edition)