Hello Friends ,
If you’re dual booting Ubuntu with Windows 7 or Linux operating system like Ubuntu,fedora,Zorin,Elementary,etc Operating Systems, you may wish to change boot order to set which OS starts by default. Well, In this tutorial I’ll show you how to change boot order or default operating system then just follow these commands ,
Step 1: In order to change default boot entry, we need to edit /etc/default/grub
file. Before that, lets take a back up for the said file so that if anything goes wrong, we can easily revert back to the previous state.
sudo cp /etc/default/grub /etc/default/grub.bak
Step 2: Edit the file /etc/default/grub using your favorite text editor.
sudo gedit /etc/default/grub
Step 3: Find a line which says GRUB_DEFAULT=0.
All the entries in the GRUB menu are zero-indexed. This means, if there are 'N' entries in the GRUB menu, the very first entry is indexed as 0 (Zero) and the last one is indexed as 'N-1'.
Step 4: Now, if you want to make 'Windows 10', which is listed at 5th position and hence having index 4, as the default boot entry. So, edit the same line to that it reads as GRUB_DEFAULT=4.
Step 5: For the changes made above to be implemented, run the following command:
sudo update-grub
And you're done !!
Note: This method will not change the order of the entries in the GRUB menu, but it would certainly boot the selected operating system.
Kindly Share This Post :)