tel: +2348055401551 (sms, whatsapp)
skype: tokunboajewole

How to change boot order of a dual boot Windows and Ubuntu PC

Just in case you are a Computer Multi-Boot guy like me, this might be of help, now or later. My linux box is presently dual boot: Windows-7 was installed first, then later added Ubuntu. The boot menu lists Windows-7 as the last(fifth) boot option.

While booting, my boot-menu looks like this..(below), thus, I have to use my keyboard to manually select Windows option just to boot into it.

Scenario: I needed to connect remotely to the box and boot into Windows7. Ubuntu was booted up, but I needed Windows. So I had to change the boot option, reboot and get my life running.


Presently, Ubuntu is default, but here is how to change it.

Launch terminal, and display grubs menuentries to confirm:

Command: cat /boot/grub/grub.cfg | grep menuentry.

In the screenshot below, I cd'd into the /boot/grub directory before grepping for menuentry. Windows-7 is listed as the 5-th option, in reality, its the 4th: numbering of entries begins at 0(zero).


Next, edit grub at /etc/default/grub.

Command: nano /etc/default/grub

In the below screenshot, I will make changes as follows:
before: GRUB_DEFAULT=0
Once the changes are made, save the file, and exit


After file is saved, update grub as follows:

Command: update-grub


Rebooting my box, the cursor is at the default setting: Windows-7


ps: I took the first and last screenshots with my phone, hence the difference in sharpness

Hope you enjoyed this tutorial. Comments are welcome and your requested tutorials are welcome as well.

Add comment

Security code

I use Linux 24x7

Recent Comments