# How to Change the kernel in Ubuntu 20.04 Linux Latest
###### tags: `Linux` `Kernel` `OS`
Sohail Anjum
Last update: 2021.09.30
### Check the available kernels:
```javascript=
# sudo apt-cache search linux-image | grep generic
```
### Install the kernel version you need from the list with correct version:
```javascript=
# sudo apt-get install linux-image-5.8.0-48-generic
# sudo apt-get install linux-headers-5.8.0-48-generic
```
### Check that Installed kernel is in the Grub menu or not:
```javascript=
# grep menuentry /boot/grub/grub.cfg
```

### Change the grub config file:
```javascript=
# sudo nano /etc/default/grub
```
#### change this line
```javascript=
# GRUB_DEFAULT=0
```
#### to the kernel you want to boot
```javascript=
# GRUB_DEFAULT="Ubuntu, with Linux 5.8.0-48-generic"
```
### Update the Grub:
```javascript=
# sudo grub-mkconfig -o /boot/grub/grub.cfg
```

### Reboot the system
```javascript=
# reboot
```
**Ubuntu can have several kernals installed but will generally use the newest one.**
**To boot from an alternate kernal that is installed: press "SHIFT Key" during the first few seconds of booting up to show the GRUB menu, select 'advanced options for ubuntu', and then select an alternate kernal from the list shown.**
**While Booting keep press the Shift Key.
-> adnavced ubuntu setting
-> choose the kernel you want from the list and press enter. The system will boot with the kernel**
### Check the Kenel version now
```javascript=
# uname -r
```

References:
https://cyb.tw/docs/Tech/2021/3/8_GRUB-upgrade-or-downgrade-the-kernel-version.html#install-new-kernel
https://zhengdao.github.io/2018/10/09/switch-ubuntu-linux-kernel/