Set default kernel version to use at boot time
Applies to: Fedora 38 and higher, Centos 7 and higher
See which kernel version you will boot into on next boot:
root@mysystem:~# grubby --default-kernel /boot/vmlinuz-6.9.4-100.fc39.x86_64
Review all kernels you have on your system
root@mysystem:~# grubby --info=ALL index=0 kernel="/boot/vmlinuz-6.9.4-200.fc40.x86_64" args="ro rhgb quiet selinux=0" root="UUID=18d4b2e8-d77d-4184-8b5e-93f4f5885699" initrd="/boot/initramfs-6.9.4-200.fc40.x86_64.img" title="Fedora Linux (6.9.4-200.fc40.x86_64) 40 (Server Edition)" id="3e64ec901c1c4472971f4e44f09e790d-6.9.4-200.fc40.x86_64" index=1 kernel="/boot/vmlinuz-6.9.4-100.fc39.x86_64" args="ro rhgb quiet selinux=0" root="UUID=18d4b2e8-d77d-4184-8b5e-93f4f5885699" initrd="/boot/initramfs-6.9.4-100.fc39.x86_64.img" title="Fedora Linux (6.9.4-100.fc39.x86_64) 39 (Server Edition)" id="3e64ec901c1c4472971f4e44f09e790d-6.9.4-100.fc39.x86_64" index=2 kernel="/boot/vmlinuz-6.8.9-100.fc38.x86_64" args="ro rhgb quiet selinux=0" root="UUID=18d4b2e8-d77d-4184-8b5e-93f4f5885699" initrd="/boot/initramfs-6.8.9-100.fc38.x86_64.img" title="Fedora Linux (6.8.9-100.fc38.x86_64) 38 (Server Edition)" id="3e64ec901c1c4472971f4e44f09e790d-6.8.9-100.fc38.x86_64" index=3 kernel="/boot/vmlinuz-0-rescue-3e64ec901c1c4472971f4e44f09e790d" args="ro rhgb quiet selinux=0" root="UUID=18d4b2e8-d77d-4184-8b5e-93f4f5885699" initrd="/boot/initramfs-0-rescue-3e64ec901c1c4472971f4e44f09e790d.img" title="Fedora Linux (0-rescue-3e64ec901c1c4472971f4e44f09e790d) 38 (Server Edition)" id="3e64ec901c1c4472971f4e44f09e790d-0-rescue"
I want my system to by default boot to 6.9.4-200.fc40.x86_64
root@mysystem:~# grubby --set-default /boot/vmlinuz-6.9.4-200.fc40.x86_64 The default is 3e64ec901c1c4472971f4e44f09e790d-6.9.4-200.fc40.x86_64.conf with index 0 and kernel /boot/vmlinuz-6.9.4-200.fc40.x86_64
Next time it will boot to version 6.9.4-200