I installed Ubuntu MATE and Kubuntu on my Laptop. I want to change the order of booting. Every time I restart I have to scroll down and hit enter to log into Kubuntu. My main priority is Kubuntu. How can I change the order in GRUB so that Kubuntu boots automatically if I don't select MATE?
1 Answers
Better method is to repeat last boot selection
The reason I say this is because sometimes when you are running Windows it will wake up at 3 am, mysteriously update, reboot, finish updating and go back to sleep. If your default was Ubuntu but periodically boot into Windows and put your system to sleep the Windows updates could start but never finish.
Another reason to repeat the last boot selection is you might be working in Kubuntu for a week, then working in Mate for a week. It's easier if Grub just remembered your last boot selection and you don't have to keep overriding every boot.
Another reason to repeat the last boot selection is if you are overriding the kernel for a few days or weeks in the Advanced Options menu. Even more so if like me you have 20+ kernels (each with three options regular, safe and repair mode) could mean a lot of arrow keys.
How to get Grub to repeat last boot selection
This is fairly straight forward. Using sudo powers edit /etc/default/grub and change the following:
#GRUB_DEFAULT=0 # Rather than option #1, we'll always default to last boot choice.
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
The first line you will be commenting out and right below that insert the next two lines.
Save the file and type in the terminal:
sudo update-grub
If you still want your original request
You can set the default boot selection by menu entry number where 0 is the first entry:
As above edit /etc/default/grub but this time use:
GRUB_DEFAULT=0
Remove the # at the beginning of the line to transform it from a comment into a command. Use 0 for menu first entry, 1 for second menu entry, etc.
See the link above for more details on setting a sub-menu entry as the default boot selection in Grub.
- 99,709
- 34
- 237
- 401
-
is this aplicable to my versions GRUB 2.02 beta3-4. My kubuntu version is 17.10..I try what u said but it says error: cant find command 'sudo'. – Giovanne Mar Feb 04 '18 at 23:23
-
As far as I know the `sudo` command is available on all Linux distributions. What does it say when you type in the terminal `which sudo`? – WinEunuuchs2Unix Feb 04 '18 at 23:28
-
I see in the boot menu press enter to boot the selected OS, 'e' ro edit the commands before booting or 'c' for a command-line.. I select 'c' and it shows this. grub>_. – Giovanne Mar Feb 04 '18 at 23:37
-
Sorry I didn't mean to get a terminal in grub. I meant once you are in Kubuntu or in Mate hold down three keys
+ – WinEunuuchs2Unix Feb 04 '18 at 23:39+T to open a terminal window. Then you can type `which sudo`. -
im in kubuntu terminal now.. i write, sudo power edit /etc/default/grub... sudo: power: command no found... – Giovanne Mar Feb 04 '18 at 23:52
-
Try `sudo -i gedit /etc/default/grub` – WinEunuuchs2Unix Feb 04 '18 at 23:54
-
bash: gedit: command not found. – Giovanne Mar Feb 04 '18 at 23:57
-
`gedit` is used in Ubuntu and comes from Gnome. I'm not sure what GUI editor comes in Kubuntu or Mate. If you don't know the editor name you can probably use the CLI editor with `sudo nano /etc/default/grub`. – WinEunuuchs2Unix Feb 05 '18 at 00:10
-
ok thanks for the reply.. as of now have to leave for a minute..thanks – Giovanne Mar Feb 05 '18 at 00:15
-
@WinEunuuchs2Unix Kubuntu has kate as a GUI editor and maybe kwrite as well. – DK Bose Feb 05 '18 at 17:08