How to configure the boot loader in Ubuntu?
In Ubuntu, you can adjust the bootloader’s settings by modifying the GRUB configuration file.
- Open the terminal and edit the GRUB configuration file as a root user using the following command.
- edit the grub configuration file by using the command sudo nano /etc/default/grub
- Find the following line, this is where you can set the default boot option:
- The default option in GRUB is set to 0.
- By default, GRUB_DEFAULT is set to 0, which means the first boot option is selected as the default. If you want to choose a different boot option as the default, you can change it to the corresponding number. For example, if you want to select the third boot option as the default, set GRUB_DEFAULT to 2.
- Optional step: If your system has multiple kernel versions to choose from, you can configure GRUB_DEFAULT with the following command to automatically select the newest kernel version.
- The default selection in GRUB is set to boot the third entry in the list.
- This will select the third sub-menu of the first boot option as the default boot item.
- Save and close the file. Press Ctrl + X, then press the Y key to save the changes.
- Update the GRUB configuration file with the following command:
- Please update the GRUB configuration.
- This will make the changes take effect.
After completing the above steps, the next time you start the system, the GRUB bootloader will automatically select the default boot option based on your settings.