How to Install Kernel 5.13 in Ubuntu 18.04 from the 20.04 Repository

Last updated: March 25, 2022 — 1 Comment

For those sticking to the old Ubuntu 18.04, but need higher Linux kernel version for specific hardware support, here’s how to install the Linux Kernel 5.13 from Ubuntu 20.04 repository.

NOTE: Ubuntu 20.04’s kernel package does install and seems running good in Ubuntu 18.04. But I’m not sure if it will cause compatibility issues. Install it ONLY that you do require it, and use it at your own risk!!

Linux Kernel 5.13 features include:

  • Initial and early support for Apple M1.
  • New “Landlock” Linux security module.
  • Initial graphics support for Alder Lake S.
  • AMD FreeSync HDMI support.
  • New Intel cooling driver
  • Realtek RTL8156 and RTL8153D support
  • New drivers support for Amazon’s Luna game controller.
  • Apple Magic Mouse 2 support .
  • Realtek RT1019, RT1316, RT711 and RT715 support.

Install Linux Kernel 5.13 in Ubuntu 18.04:

You know, the Mainline Kernel PPA maintains the latest kernel package. However, it’s now built against the most recent Ubuntu libc6 library.

The Kernel package from Ubuntu 20.04 repository could be the only way to get recent Kernels for Ubuntu 18.04, except for building by yourself.

1. Add Ubuntu 20.04 Updates repository:

Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, paste the command below and hit enter:

sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu focal-updates main" >> /etc/apt/sources.list'

The command adds focal-updates repository to your system software sources.

2. Set lower priority for the repository:

Also in terminal window, run command to create and open a config file via Gedit text editor:

sudo gedit /etc/apt/preferences.d/99focal-updates

When the file opens, add following lines and save it:

Package: *
Pin: release a=focal-updates
Pin-Priority: 1

After that, your system will not automatically install updates from this repository, unless you do it manually.

3. Update package cache:

Before being able to install packages from that repository, refresh system cache via command:

sudo apt update

If you’re following this tutorial on 18.04 based system that missing GPG key, run the commands below one by one to get them:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C

4. Install Kernel 5.13:

Finally install the 20.04’s kernel package via the command below. So far, it’s Kernel 5.13.

sudo apt install linux-generic-hwe-20.04

After installation, restart your PC and verify via command:

uname -a

How to Remove Kernel 5.13 from Ubuntu 18.04:

To remove the focal-updates repository, run command to edit software sources file:

sudo gedit /etc/apt/sources.list

When the file opens, remove or comment (add # at the beginning) the line of:

deb http://archive.ubuntu.com/ubuntu focal-updates main

After saved it, run sudo apt update to refresh the cache.

To remove Linux Kernel 5.13, you need to firstly restart and select boot with an old kernel (v5.4.x) from boot menu -> Advanced options.

Once you get into Ubuntu 18.04 with the previous Kernel, run the command below to remove Kernel 5.13:

sudo apt remove linux-image-5.13.0-37-generic linux-headers-5.13.0-37-generic linux-hwe-5.13-headers-5.13.0-37

NOTE: Ubuntu updates the kernel packages regularly, the package version may be different!! Change it to the one that you installed.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

One response to How to Install Kernel 5.13 in Ubuntu 18.04 from the 20.04 Repository

  1. Dont do it guys, Because of him I lost my kernel.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*