The proper command is grub2-set-default
. This does not change the order of entries in the grub2 boot menu, but sets which entry is the default one to boot. The better method is to use menu entry title rather than a number, as the number can change as kernels are added starting from a new install.
Assuming a UEFI install, you can get the Windows title with this command:
# grep menuentry /boot/efi/EFI/fedora/grub.cfg
The title is the text between the single quotes that appears immediately after "menuentry", and should be placed into double quotes in the command, e.g.:
# grub2-set-default "Windows 10 (loader) (on /dev/sda1)"
The same thing can be accomplished by editing the /etc/default/grub file and editing the line:
And placing the full title, again, in double quotes, after the = sign, Then to make that active, you have to run:
# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg