If you used systemd based latest Ubuntu distro and you have installed with Windows OS you need to change GRUB boot order to make Windows as a Default boot option you may required to use this tutorial. The Ubuntu with systemd is totally different from init based system it is fast and secure. You need to follow this tutorial very carefully and follow all the steps.

Step-1 (Switch to root user)
$ su -
Step-2 (Check the order of  OS that is detected by GRUB boot loader)
# grep "^menuentry" /boot/grub/grub.cfg | cut -d "'" -f2

Sample Output

Linux Mint 18 Cinnamon 64-bit
Memory test (memtest86+)
Memory test (memtest86+, serial console 115200)
Windows 10 (loader) (on /dev/sda1)

Note: check the order of Windows 10 in the above sample output the Windows OS is set to order 4.

Step-3 (Set the default OS)
# grub-set-default 4
Step-4 (Check the default grub OS)
# grub-editenv list

Sample Output

Step-5 (Edit the default GRUB configuration file)
# nano /etc/default/grub

Sample output

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

To change the GRUB Default options you need to edit given lines


change it to


To change the GRUB Timeout period you need to edit given lines


change it to

Step-6 (Applying changes to grub.cfg file)
# grub-mkconfig -o /boot/grub/grub.cfg
Step-7 (Update these changes to grub)
# update-grub

Sample output

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 10 (loader) on /dev/sda1
Step-8 (Restart now to see changes in effect)
# init 6

That’s all for now.

How to Secure and Harden WordPress Server on a Linux VPS

Previous article

How to Install Samba on Ubuntu / Debian

Next article

You may also like


Leave a reply

Your email address will not be published. Required fields are marked *

More in Linux