How To: Remember the Last Boot Selection in GRUB#
If you have a dual-boot system with Linux and Windows OS, you probably have GRUB installed as a bootloader.
Now, if you wanted Grub to remember the last selected OS rather than booting the default OS or the first entry in the table, you can tell grub by editing the grub settings.
Proceed as follows:
- Boot into Linux, e.g., Ubuntu, and open a terminal.
- Edit the Grub settings:
- Comment out the line with
GRUB_DEFAULT=0
(or whatever number) and replace it by: - Save the file and update Grub by typing:
- (Only if applicable) If update-grub is not available:
Now, if you reboot from within Windows, Windows will be booted. This also applies to Ubuntu.