If you are dual booting Linux and Windows, you might want to have Grub automatically select the last booted OS instead of just going with the default. The whole trick rests on adding just two lines to /etc/default/grub
:
/etc/default/grubGRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
Of course that has to be followed by update-grub
:
Terminalsudo update-grub
Now Grub will track which OS you booted last and preselect that menu entry.
PS: If you have custom menu entries, do not forget that you need to have savedefault
option present.