GNU GRUB Menu: Change the Default Boot OS

ApplicationGNU GRUB (GRand Unified Bootloader )
OSLubuntu v18.10 (64-bit) (Linux)
SystemGateway NV78

After installing Lubuntu on a system where Windows 10 was already installed, the GNU Grub menu will be displayed when the system boots. Ubuntu/Lubuntu will be the default OS that will start automatically. If you prefer to automatically boot into Windows 10 (or whichever OS was already installed), follow the steps here, after you’ve booted and logged into Lubuntu.

1. Find the string for the OS you want to set as the default.

$ grep menuentry /boot/grub/grub.cfg

2. Highlight the string and copy it to the clipboard. (include the quotes.)

e.g. "Windows 10 (loader) (on /dev/sda1)"

3. Edit /etc/default/grub

$ sudo vi /etc/default/grub

4. Change the value of GRUB_DEFAULT from 0 to the OS string you copied from /boot/grub/grub.cfg, then save /etc/default/grub.

5. Regenerate the Grub menu, /boot/grub/grub.cfg, by running the following command:

$ sudo update-grub

6. Reboot the computer to verify the expected OS is the default.