How do you change and set the default Kernel in Ubuntu Machine?

Manzeel Uprety
3 min readFeb 23, 2024

Have you ever encountered a situation where you need to change the default kernel of your Ubuntu machine and switch to a different one?

I have faced this situation myself, and after spending some time, I’ve come across a simple method to change your Ubuntu kernel to the one of your choice.

Read this guide directly on my site https://www.manzeel.com.np/

For this post, I am using an Ubuntu 18.04 machine running on AWS.

To check the kernel of the Ubuntu machine, SSH into the machine using your terminal. Use the following command to check the current kernel version.

ubuntu@ip-172–32–11–86:~$ uname -r
5.4.0-1103-aws

To see the list of installed kernels for this Ubuntu machine, use the following command in your terminal

ubuntu@ip-172–32–11–86:~$ dpkg-query -W -f='${Package} ${Version}\n' | grep -E '^(linux.*)'

You will get a list of installed kernels for your Ubuntu machine. Choose the kernel to be set and install it using the following command.

ubuntu@ip-172–32–11–86:~$…

--

--