{"id":38114,"date":"2022-03-25T15:11:51","date_gmt":"2022-03-25T15:11:51","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=38114"},"modified":"2022-03-25T15:14:31","modified_gmt":"2022-03-25T15:14:31","slug":"install-kernel-5-13-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2022\/03\/install-kernel-5-13-ubuntu-18-04\/","title":{"rendered":"How to Install Kernel 5.13 in Ubuntu 18.04 from the 20.04 Repository"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/tux-icon-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-thumbnail wp-image-35489\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/tux-icon-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/tux-icon-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/tux-icon-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/tux-icon-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/11\/tux-icon.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>For those sticking to the old Ubuntu 18.04, but need higher Linux kernel version for specific hardware support, here&#8217;s how to install the Linux Kernel 5.13 from Ubuntu 20.04 repository.<\/p>\n<p><b>NOTE: Ubuntu 20.04&#8217;s kernel package does install and seems running good in Ubuntu 18.04. But I&#8217;m not sure if it will cause compatibility issues. Install it ONLY that you do require it, and use it at your own risk!!<\/b><\/p>\n<p>Linux Kernel 5.13 features include:<\/p>\n<ul>\n<li>Initial and early support for Apple M1. <\/li>\n<li>New &#8220;Landlock&#8221; Linux security module.<\/li>\n<li>Initial graphics support for Alder Lake S.<\/li>\n<li>AMD FreeSync HDMI support.<\/li>\n<li>New Intel cooling driver <\/li>\n<li>Realtek RTL8156 and RTL8153D support<\/li>\n<li>New drivers support for Amazon\u2019s Luna game controller.<\/li>\n<li>Apple Magic Mouse 2 support .<\/li>\n<li>Realtek RT1019, RT1316, RT711 and RT715 support.<\/li>\n<\/ul>\n<h3>Install Linux Kernel 5.13 in Ubuntu 18.04:<\/h3>\n<p>You know, the <a href=\"http:\/\/kernel.ubuntu.com\/~kernel-ppa\/mainline\/\" rel=\"noopener\" target=\"_blank\">Mainline Kernel PPA<\/a> maintains the latest kernel package. However, it&#8217;s now built against the most recent Ubuntu libc6 library.<\/p>\n<p>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.<\/p>\n<h4>1. Add Ubuntu 20.04 Updates repository:<\/h4>\n<p>Firstly, press <b>Ctrl+Alt+T<\/b> on keyboard to open terminal. When it opens, paste the command below and hit enter:<\/p>\n<pre>sudo sh -c 'echo \"deb http:\/\/archive.ubuntu.com\/ubuntu focal-updates main\" >> \/etc\/apt\/sources.list'<\/pre>\n<p>The command adds focal-updates repository to your system software sources.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/add-focal-update-ppa-600x215.webp\" alt=\"\" width=\"600\" height=\"215\" class=\"aligncenter size-large wp-image-38117\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/add-focal-update-ppa-600x215.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/add-focal-update-ppa-300x107.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/add-focal-update-ppa.webp 734w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h4>2. Set lower priority for the repository:<\/h4>\n<p>Also in terminal window, run command to create and open a config file via Gedit text editor:<\/p>\n<pre>sudo gedit \/etc\/apt\/preferences.d\/99focal-updates<\/pre>\n<p>When the file opens, add following lines and save it:<\/p>\n<p><strong>Package: *<br \/>\nPin: release a=focal-updates<br \/>\nPin-Priority: 1<\/strong><\/p>\n<p>After that, your system will not automatically install updates from this repository, unless you do it manually.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/focalupdates-priority-600x196.webp\" alt=\"\" width=\"600\" height=\"196\" class=\"aligncenter size-large wp-image-38118\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/focalupdates-priority-600x196.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/focalupdates-priority-300x98.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/focalupdates-priority-768x250.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/focalupdates-priority.webp 801w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h4>3. Update package cache:<\/h4>\n<p>Before being able to install packages from that repository, refresh system cache via command:<\/p>\n<pre>sudo apt update<\/pre>\n<p>If you&#8217;re following this tutorial on 18.04 based system that missing GPG key, run the commands below one by one to get them:<\/p>\n<pre>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32<\/pre>\n<pre>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C<\/pre>\n<h4>4. Install Kernel 5.13:<\/h4>\n<p>Finally install the 20.04&#8217;s kernel package via the command below. So far, it&#8217;s Kernel 5.13.<\/p>\n<pre>sudo apt install linux-generic-hwe-20.04<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/apt-kernel2004-600x347.webp\" alt=\"\" width=\"600\" height=\"347\" class=\"aligncenter size-large wp-image-38119\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/apt-kernel2004-600x347.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/apt-kernel2004-300x174.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/apt-kernel2004.webp 734w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>After installation, restart your PC and verify via command:<\/p>\n<pre>uname -a<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/verify-bionic-kernel-600x195.webp\" alt=\"\" width=\"600\" height=\"195\" class=\"aligncenter size-large wp-image-38120\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/verify-bionic-kernel-600x195.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/verify-bionic-kernel-300x97.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/verify-bionic-kernel.webp 734w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h3>How to Remove Kernel 5.13 from Ubuntu 18.04:<\/h3>\n<p>To remove the focal-updates repository, run command to edit software sources file:<\/p>\n<pre>sudo gedit \/etc\/apt\/sources.list<\/pre>\n<p>When the file opens, remove or comment (add # at the beginning) the line of:<\/p>\n<p><b>deb http:\/\/archive.ubuntu.com\/ubuntu focal-updates main<\/b><\/p>\n<p>After saved it, run <code>sudo apt update<\/code> to refresh the cache.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/remove-focalupdates-600x387.webp\" alt=\"\" width=\"600\" height=\"387\" class=\"aligncenter size-large wp-image-38121\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/remove-focalupdates-600x387.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/remove-focalupdates-300x194.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/remove-focalupdates-768x496.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/03\/remove-focalupdates.webp 940w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>To remove Linux Kernel 5.13, you need to <b>firstly restart and select boot with an old kernel (v5.4.x)<\/b> from boot menu -> Advanced options.<\/p>\n<p>Once you get into Ubuntu 18.04 with the previous Kernel, run the command below to remove Kernel 5.13:<\/p>\n<pre>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<\/pre>\n<p><b>NOTE: Ubuntu updates the kernel packages regularly, the package version may be different!! Change it to the one that you installed.<\/b><\/p>","protected":false},"excerpt":{"rendered":"<p>For those sticking to the old Ubuntu 18.04, but need higher Linux kernel version for specific hardware support, here&#8217;s how to install the Linux Kernel 5.13 from Ubuntu 20.04 repository. NOTE: Ubuntu 20.04&#8217;s kernel package does install and seems running good in Ubuntu 18.04. But I&#8217;m not sure if it will cause compatibility issues. Install [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":35489,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[160],"class_list":["post-38114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-kernel"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/38114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=38114"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/38114\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/35489"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=38114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=38114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=38114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}