# How can change default kernel in grub?

**URL:** <https://linux-tips.com/t/how-can-change-default-kernel-in-grub/352>\
**Category:** Distributions\
**Created:** [May 31, 2016, 11:08am UTC](https://linux-tips.com/t/how-can-change-default-kernel-in-grub/352 "2016-05-31T11:08:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sputnik](https://linux-tips.com/user_avatar/linux-tips.com/sputnik/32/91_2.png) [@sputnik](https://linux-tips.com/u/sputnik)\
**Post date:** [May 31, 2016, 11:08am UTC](https://linux-tips.com/t/how-can-change-default-kernel-in-grub/352/1 "2016-05-31T11:08:35Z")

</div>

I’m running Debian Jessie with kernel version 4.5.

Today I just install an older 3.18 kernel but I couldn’t make it default.

When I look at the `/boot/grub/grub.cfg` I can see that it is located under `Debian GNU/Linux` menu as a submenu of named `Debian GNU/Linux, with Linux 3.18.25.jessiemptcp`.

I know that there is a configuration option named `GRUB_DEFAULT=0` in `/etc/default/grub`.  
What is the correct format or number to change default kernel as a submenu entry

---

<div class="post-metadata">

**Author:** ![Debuser](https://linux-tips.com/letter_avatar_proxy/v4/letter/d/96bed5/32.png) [@Debuser](https://linux-tips.com/u/Debuser)\
**Post date:** [May 31, 2016, 11:16am UTC](https://linux-tips.com/t/how-can-change-default-kernel-in-grub/352/2 "2016-05-31T11:16:53Z")

</div>

You can use **\>** character and numbers to select a submenu entry as default.

**0** refers to first menu entry in grub. If parent of subentries starts from index **1** and you want to boot from third submenu entry as default (so that index number is **2** ), you need to change `GRUB_DEFAULT` variable as below:

```auto
GRUB_DEFAULT="1>2"

```

> Please note that, there are no space characters before or after **\>**

But, it is hard to describe submenu entry selection with numbers. There is another way, you can also use menu names like below:

```auto
GRUB_DEFAULT="Advanced options for Debian GNU/Linux>Debian GNU/Linux, with Linux 3.18.25.jessiemptcp"

```

After that, you need to run `sudo update-grub` command as well.
