Skip to content

Instantly share code, notes, and snippets.

@chirag64
Created April 20, 2014 17:14
Show Gist options
  • Save chirag64/11119492 to your computer and use it in GitHub Desktop.
Save chirag64/11119492 to your computer and use it in GitHub Desktop.
Set Windows as default entry in GRUB on Fedora
  • Open /etc/default/grub and ensure this line exists:

GRUB_DEFAULT=saved

  • Apply the change to grub.cfg by running:

grub2-mkconfig -o /boot/grub2/grub.cfg

  • Run this to set default to Windows

grub2-set-default "$(grep -o "Windows[^']*" /boot/grub2/grub.cfg)" && grub2-editenv list

@vvavrychuk
Copy link

This instructions concern BIOS-based machines. For UEFI-machines path to grub config file is

/boot/efi/EFI/fedora/grub.cfg

see https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment