Nov 10, 2018

How to change default Operating System in start up grub boot menu in Linux

Get your menuentries:

$ sudo grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2

Your output is similar to:

Windows 7 (loader) (on /dev/sda1)
Now set the desired default menu entry:

$ sudo grub2-set-default <menu entry title>

such as:

$ sudo grub2-set-default 'Windows 7 (loader) (on /dev/sda1)'

Verify the default menu entry

$ grub2-editenv list
saved_entry=Windows 7 (loader) (on /dev/sda1)