You can also change the grub default boot entry from the command line without having to install any additional tool. This won't change the order in the list but it will allow a different OS to boot by default, which sounds like what you may want anyway.
First, make a backup copy of /etc/default/grub
. In case something goes wrong, you can easily revert to the known-good copy:
sudo cp /etc/default/grub /etc/default/grub.bak
Then edit the file using vim
or the text editor of your choice:
sudo vim /etc/default/grub
Find the line that contains
GRUB_DEFAULT=0
and set it to
GRUB_DEFAULT=x
where x
is the index of grub menu item to which you would like to boot to by default. Note that the menu items are zero-indexed. That means that the first item in the list is 0
and that the sixth item is actually 5
. So to boot to the sixth item in the list, the line would read:
GRUB_DEFAULT=5
If you forgot the order of the items, take a look at /boot/grub/grub.cfg
. Each menu entry is specified by a line of type:
menuentry 'Ubuntu' [options] {
You can also chose the default by the name instead of index, e.g.:
GRUB_DEFAULT='Ubuntu'
if there was a menuentry 'Ubuntu'
line on /boot/grub/grub.cfg
. This may be a better method, as it does not depend on the order of the entries, which could change.
To use a kernel in the "Previous Linux Versions" sub-menu use:
GRUB_DEFAULT="Advanced options for Ubuntu>x"
(make sure to include the quotations), where x
is the index of the old kernel on the sub-menu, or the name of the kernel as it appears in /boot/grub/grub.cfg
. For example,
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-45-generic"
Then build the updated grub menu:
sudo update-grub
sudo apt-get install kde-config-grub2
then in system config goto startup shutdown