Edit GRUB Defaults
Have you installed Linux in your computer recently? Would you like to mark a particular operating system as the default, other than your Linux? If yes, this tutorial is for you.
Command line method:
First, open the terminal. Copy and paste the given command in the terminal, and hit enter:
sudo nano /etc/default/grubYou may be asked for a password if you're a non-root user. Enter your password now.
After entering your password, you'll get a screen as follows:
(Note: this screen may change within distributions. This is the one found in Fedora 33).
Here, find the line GRUB_DEFAULT and replace it with a number at which, your OS is found in the bootloader. In my case, Windows is found at the 4th place. In order to select Windows as default, I must enter 3 (since the order begins with 0, 1, 2, and so on).
After editing, save the file by pressing Ctrl + X, then press Y, and hit [Enter].
Confirmation dialog to save file (press Y) |
Press enter to save file and exit |
After editing the file, run this command:
[Debian based]
[pranav@hcl-c2duo ~]$ sudo update-grub
OR
[pranav@hcl-c2duo ~]# update-grub
[Arch based]
[pranav@hcl-c2duo ~]# grub-mkconfig -o /boot/grub/grub.cfg
Reboot your computer for the changes to occur. It may look like this:
Using GRUB Customizer:
If you prefer using the GUI method, you may look for the GRUB Customizer.
To install GRUB Customizer in Ubuntu: sudo apt install grub-customizer
To install GRUB Customizer in Arch: sudo pacman -S grub-customizer
To install GRUB Customizer in Fedora: sudo dnf install grub-customizer
Once you open a GRUB Customizer, it may look like this (you may have to enter admin password):
GRUB Customizer (General Settings) |
Check for the default entry section. Select the predefined option, open up the drop-down menu, and select one of the entries.
Select your entry from dropdown |
After selecting your desired entry, click save. Once the configurations are updated, you can reboot your system now, and look for the changes.
So, I hope this tutorial helps you. If you're experiencing problems, feel free to mention them in the comments section. Follow my website for more Linux tutorials.
Happy Linuxing :)
[P.S: GRUB Customizer looks a bit different in my case, since it's running Fedora. It may vary from distro to distro :) ]
Superda pranav
ReplyDeleteThanks man
Delete