Steps to change boot options on Linux
Follow the given steps to change boot options on your device.
Step 1: Open Terminal in Linux
Boot into your Linux partition and click on show applications and then search for terminal. Once you see this terminal icon, click on that and open terminal which is a command line tool using which we will interact with the Operating System. We will be executing our commands needed to change boot options on this terminal.
Step 2: Open Grub boot-loader configuration
GRUB is the default boot loader for most of the linux distributions. It atomically becomes the default boot-loader once it get installed. To access the GRUB boot config file, you have to enter the superuser mode, for that we will use sudo, which will grant some privileges to access system resources and change things which are not allowed to a normal user. you can learn more about ‘sudo’ command in linux here. Now run the following command in terminal to open the config file in nano editor ( a command-line text editor in linux).
sudo nano /etc/default/grub
Enter your user password and it will open the desired file in nano editor.
Step 3: Change boot configuration
You can observe that GRUB_DEFAULT is set to 0 which is Ubuntu as it is following zero-based indexing. GRUB_TIMEOUT = 10 indicating that boot menu will give 10 sec to toggle between boot options after which computer will boot into default OS which is Ubuntu in this case.
Change GRUB_DEFAULT = 2 to make windows as default (Observe the default boot menu you will see windows option was at number 3, which is no 2 in zero-based indexing). You can also write down the name of boot option in this place to change your boot option. You can also change the time given to choose OS in the boot menu by changing the GRUB_TIMEOUT value , which is set to 10 by default. Let’s change it to 5.
Step 4: Save the changes and update Grub
Press Ctrl + O to save the changes in file “/boot/grub/grub.cfg.” and then press Ctrl+X to exit the nano editor.
Once you are back in the terminal, run the following command to update the boot menu and execute the changes made.
sudo update-grub
Step 5: Restart your Computer and see the changes
Once you have completed the above steps, restart your computer and wait until the boot menu appears, and you should be able to see changes in your boot options. Now the windows partition will be the one to boot by default and menu will disappear in 5 sec.
Now, you have successfully changed the boot options in your computer, you can change the options in case of multiple boot-able partitions available in your computer. Follow the zero-based indexing and you are good to go.
How to Change Boot Options on Linux
During the computer startup process, users are presented with boot options in the boot menu. This menu displays all the available bootable partitions on the computer. Users must decide within a specified time frame which operating system (OS) they want to boot into. If no option is selected within this time, the default boot option takes precedence, and the system boots into the specified OS. Typically, boot options become relevant when there are two or more operating systems installed on the system. Many users opt for a dual-boot configuration with Windows and Linux. In such cases, the GRUB boot loader assigns priority to Linux by default. This default setting might be inconvenient for users who primarily use Windows and occasionally switch to Linux. If users aren’t attentive during startup, their device will automatically boot into Linux, potentially causing frustration for those who primarily use Windows.
In this article, we will see how to change boot options by accessing the grub configuration file in Linux.
Now, this is what your device’s boot screen looks like before changing the boot options. You can observe the boot options given and their order. (Remember this options given are using zero-based indexing i.e Boot option ‘Ubuntu’ is boot option ‘0’).