Skip to content

Instantly share code, notes, and snippets.

@huangcheng
Forked from chirag64/SetWindowsGrubDefault.md
Created April 18, 2021 08:52
Show Gist options
  • Select an option

  • Save huangcheng/8be9772a3bff8f0ee14042f8311923a3 to your computer and use it in GitHub Desktop.

Select an option

Save huangcheng/8be9772a3bff8f0ee14042f8311923a3 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

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