{"id":7287,"date":"2019-01-07T22:13:09","date_gmt":"2019-01-07T22:13:09","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=7287"},"modified":"2019-01-08T13:45:30","modified_gmt":"2019-01-08T13:45:30","slug":"different-ways-to-update-linux-kernel-for-ubuntu","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/07\/different-ways-to-update-linux-kernel-for-ubuntu\/","title":{"rendered":"Different Ways To Update Linux Kernel For Ubuntu"},"content":{"rendered":"<p class=\"post-byline\"><time class=\"published\" datetime=\"January 7, 2019\">JANUARY 7, 2019<\/time><\/p>\n<div class=\"post-format\">\n<div class=\"image-container\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-thumb-large size-thumb-large wp-post-image tc-smart-load-skip tc-smart-loaded\" src=\"https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/ubuntu-linux-kernel-720x340.png\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" srcset=\"https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/ubuntu-linux-kernel-720x340.png 720w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/ubuntu-linux-kernel-520x245.png 520w\" alt=\"update linux kernel for ubuntu\" width=\"720\" height=\"340\" \/><\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<div class=\"entry themeform share fittexted_for_entry\">\n<div class=\"entry-inner\">\n<p>In this guide, we have given 7 different ways to update Linux kernel for Ubuntu. Among the 7 methods, five methods requires system reboot to apply the new Kernel and two methods don\u2019t. Before updating Linux Kernel, it is\u00a0<strong>highly recommended to backup your important data!\u00a0<\/strong>All methods mentioned here are tested on Ubuntu OS only. We are not sure if they will work on other Ubuntu flavors (Eg. Xubuntu) and Ubuntu derivatives (Eg. Linux Mint).<\/p>\n<h2 class=\"fittexted_for_content_h2\">Part A \u2013 Kernel Updates with reboot<\/h2>\n<p>The following methods requires you to reboot your system to apply the new Linux Kernel. All of the following methods are recommended for personal or testing systems. Again, please backup your important data, configuration files and any other important stuff from your Ubuntu system.<\/p>\n<h4 class=\"fittexted_for_content_h4\">Method 1 \u2013 Update the Linux Kernel with dpkg (The manual way)<\/h4>\n<p>This method helps you to manually download and install the latest available Linux kernel from\u00a0<strong><a title=\"\" href=\"http:\/\/kernel.ubuntu.com\/~kernel-ppa\/mainline\/\" target=\"_blank\" rel=\"noopener\">kernel.ubuntu.com<\/a><\/strong>\u00a0website. If you want to install most recent version (either stable or release candidate), this method will help. Download the Linux kernel version from the above link. As of writing this guide, the latest available version was\u00a0<strong>5.0-rc1<\/strong>\u00a0and latest stable version was\u00a0<strong>v4.20<\/strong>.<\/p>\n<p><a class=\"\" href=\"http:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Ubuntu-mainline-kernel.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-16154 tc-smart-load-skip tc-smart-loaded\" src=\"http:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Ubuntu-mainline-kernel.png\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" srcset=\"https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Ubuntu-mainline-kernel.png 1366w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Ubuntu-mainline-kernel-300x150.png 300w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Ubuntu-mainline-kernel-768x385.png 768w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Ubuntu-mainline-kernel-1024x513.png 1024w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Ubuntu-mainline-kernel-520x261.png 520w\" alt=\"\" width=\"1366\" height=\"685\" \/><\/a><\/p>\n<p>Click on the Linux Kernel version link of your choice and find the section for your architecture (\u2018Build for XXX\u2019). In that section, download the two files with these patterns (where X.Y.Z is the highest version):<\/p>\n<ol>\n<li>linux-image-*X.Y.Z*-generic-*.deb<\/li>\n<li>linux-modules-X.Y.Z*-generic-*.deb<\/li>\n<\/ol>\n<p>In a terminal, change directory to where the files are and run this command to manually install the kernel:<\/p>\n<pre>$ sudo dpkg --install *.deb<\/pre>\n<p>Reboot to use the new kernel:<\/p>\n<pre>$ sudo reboot<\/pre>\n<p>Check the kernel is as expected:<\/p>\n<pre>$ uname -r<\/pre>\n<p>For step by step instructions, please check the section titled under \u201cInstall Linux Kernel 4.15 LTS On DEB based systems\u201d in the following guide.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.ostechnix.com\/install-linux-kernel-4-15-rpm-deb-based-systems\/\" target=\"_blank\" rel=\"noopener\"><strong>Install Linux Kernel 4.15 In RPM And DEB Based Systems<\/strong><\/a><\/li>\n<\/ul>\n<p>The above guide is specifically written for 4.15 version. However, all the steps are same for installing latest versions too.<\/p>\n<p><strong>Pros:<\/strong>\u00a0No internet needed (You can download the Linux Kernel from any system).<\/p>\n<p><strong>Cons:<\/strong>\u00a0Manual update. Reboot necessary.<\/p>\n<h4 class=\"fittexted_for_content_h4\">Method 2 \u2013 Update the Linux Kernel with apt-get (The recommended method)<\/h4>\n<p>This is the recommended way to install latest Linux kernel on Ubuntu-like systems. Unlike the previous method, this method will download and install latest Kernel version from Ubuntu official repositories instead of\u00a0\u00a0<strong>kernel.ubuntu.com<\/strong>\u00a0website..<\/p>\n<p>To update the whole system including the Kernel, just do:<\/p>\n<pre>$ sudo apt-get update<\/pre>\n<pre>$ sudo apt-get upgrade<\/pre>\n<p>If you want to update the Kernel only, run:<\/p>\n<pre>$ sudo apt-get upgrade linux-image-generic<\/pre>\n<p><strong>Pros:<\/strong>\u00a0Simple. Recommended method.<\/p>\n<p><strong>Cons:<\/strong>\u00a0Internet necessary. Reboot necessary.<\/p>\n<p>Updating Kernel from official repositories will mostly work out of the box without any problems. If it is the production system, this is the recommended way to update the Kernel.<\/p>\n<p>Method 1 and 2 requires user intervention to update Linux Kernels. The following methods (3, 4 &amp; 5) are mostly automated.<\/p>\n<h4 class=\"fittexted_for_content_h4\">Method 3 \u2013 Update the Linux Kernel with Ukuu<\/h4>\n<p><strong>Ukuu<\/strong>\u00a0is a Gtk GUI and command line tool that downloads the latest main line Linux kernel from\u00a0<strong>kernel.ubuntu.com<\/strong>, and install it automatically in your Ubuntu desktop and server editions. Ukku is not only simplifies the process of manually downloading and installing new Kernels, but also helps you to safely remove the old and unnecessary Kernels. For more details, refer the following guide.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.ostechnix.com\/ukuu-an-easy-way-to-install-and-upgrade-linux-kernel-in-ubuntu-based-systems\/\" target=\"_blank\" rel=\"noopener\"><strong>Ukuu \u2013 An Easy Way To Install And Upgrade Linux Kernel In Ubuntu-based Systems<\/strong><\/a><\/li>\n<\/ul>\n<p><strong>Pros:<\/strong>\u00a0Easy to install and use. Automatically installs main line Kernel.<\/p>\n<p><strong>Cons:<\/strong>\u00a0Internet necessary. Reboot necessary.<\/p>\n<h4 class=\"fittexted_for_content_h4\">Method 4 \u2013 Update the Linux Kernel with UKTools<\/h4>\n<p>Just like Ukuu, the\u00a0<strong>UKTools<\/strong>\u00a0also fetches the latest stable Kernel from from\u00a0<strong>kernel.ubuntu.com<\/strong>\u00a0site and installs it automatically on Ubuntu and its derivatives like Linux Mint. More details about UKTools can be found in the link given below.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.ostechnix.com\/uktools-upgrade-latest-linux-kernel-in-ubuntu-and-derivatives\/\" target=\"_blank\" rel=\"noopener\"><strong>UKTools \u2013 Upgrade Latest Linux Kernel In Ubuntu And Derivatives<\/strong><\/a><\/li>\n<\/ul>\n<p><strong>Pros:<\/strong>\u00a0Simple. Automated.<\/p>\n<p><strong>Cons:<\/strong>\u00a0Internet necessary. Reboot necessary.<\/p>\n<h4 class=\"fittexted_for_content_h4\">Method 5 \u2013 Update the Linux Kernel with Linux Kernel Utilities<\/h4>\n<p><strong>Linux Kernel Utilities<\/strong>\u00a0is yet another program that makes the process of updating Linux kernel easy in Ubuntu-like systems. It is actually a set of BASH shell scripts used to compile and\/or update latest Linux kernels for Debian and derivatives. It consists of three utilities, one for manually compiling and installing Kernel from source from\u00a0<a title=\"\" href=\"http:\/\/www.kernel.org\/\" target=\"_blank\" rel=\"noopener\"><strong>http:\/\/www.kernel.org<\/strong><\/a>\u00a0website, another for downloading and installing pre-compiled Kernels from from\u00a0<strong>https:\/\/kernel.ubuntu.com<\/strong>\u00a0website. and third script is for removing the old kernels. For more details, please have a look at the following link.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.ostechnix.com\/linux-kernel-utilities-scripts-compile-update-latest-linux-kernel-debian-derivatives\/\" target=\"_blank\" rel=\"noopener\"><strong>Linux Kernel Utilities \u2013 Scripts To Compile And Update Latest Linux Kernel For Debian And Derivatives<\/strong><\/a><\/li>\n<\/ul>\n<p><strong>Pros:<\/strong>\u00a0Simple. Automated.<\/p>\n<p><strong>Cons:<\/strong>\u00a0Internet necessary. Reboot necessary.<\/p>\n<hr \/>\n<p><strong>Related read:<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/www.ostechnix.com\/different-methods-upgrade-ubuntu-latest-version\/\" target=\"_blank\" rel=\"noopener\"><strong>Different Methods To Upgrade Ubuntu To Latest Version<\/strong><\/a><\/li>\n<\/ul>\n<hr \/>\n<h2 class=\"fittexted_for_content_h2\">Part B \u2013 Kernel Updates without reboot<\/h2>\n<p>As I already said, all of above methods need you to reboot the server before the new kernel is active. If they are personal systems or testing machines, you could simply reboot and start using the new Kernel. But, what if they are production systems that requires zero downtime? No problem. This is where\u00a0<strong>Livepatching<\/strong>\u00a0comes in handy!<\/p>\n<p>The\u00a0<strong>livepatching\u00a0<\/strong>(or hot patching) allows you to\u00a0 install Linux updates or patches without rebooting, keeping your server at the latest security level, without any downtime. This is attractive for \u2018always-on\u2019 servers, such as web hosts, gaming servers, in fact, any situation where the server needs to stay on all the time. Linux vendors maintain patches only for security fixes, so this approach is best when security is your main concern.<\/p>\n<p>The following two methods doesn\u2019t require system reboot and useful for updating Linux Kernel on production and mission-critical Ubuntu servers.<\/p>\n<h4 class=\"fittexted_for_content_h4\">Method 6 \u2013 Update the Linux Kernel Canonical Livepatch Service<\/h4>\n<p><a class=\"\" href=\"http:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Livepatch.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-16155 tc-smart-load-skip tc-smart-loaded\" src=\"http:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Livepatch.png\" sizes=\"auto, (max-width: 1033px) 100vw, 1033px\" srcset=\"https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Livepatch.png 1033w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Livepatch-300x215.png 300w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Livepatch-768x550.png 768w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Livepatch-1024x734.png 1024w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/Livepatch-520x373.png 520w\" alt=\"Ubuntu Livepatch\" width=\"1033\" height=\"740\" \/><\/a><\/p>\n<p><a title=\"\" href=\"https:\/\/www.ubuntu.com\/livepatch\" target=\"_blank\" rel=\"noopener\"><strong>Canonical Livepatch Service<\/strong><\/a>\u00a0applies Kernel updates, patches and security hotfixes automatically without rebooting the Ubuntu systems. It reduces the Ubuntu systems downtime and keep them secure. Canonical Livepatch Service can be set up either during or after installation. If you are using desktop Ubuntu, the Software Updater will automatically check for kernel patches and notify you. In a console-based system, it is up to you to run apt-get update regularly. It will install kernel security patches only when you run the command \u201capt-get upgrade\u201d, hence is semi-automatic.<\/p>\n<p>Livepatch is free for three systems. If you have more than three, you need to upgrade to enterprise support solution named\u00a0<strong>Ubuntu Advantage<\/strong>\u00a0suite. This suite includes\u00a0<strong>Kernel Livepatching<\/strong>\u00a0and other services such as,<\/p>\n<ul>\n<li>Extended Security Maintenance \u2013 critical security updates after Ubuntu end-of-life.<\/li>\n<li class=\"p-list__item is-ticked\">Landscape \u2013 the systems management tool for using Ubuntu at scale.<\/li>\n<li class=\"p-list__item is-ticked\">Knowledge Base \u2013 A private collection of articles and tutorials written by Ubuntu experts.<\/li>\n<li class=\"p-list__item is-ticked\">Phone and web-based support.<\/li>\n<\/ul>\n<p><strong>Cost<\/strong><\/p>\n<p>Ubuntu Advantage includes three paid plans namely, Essential, Standard and Advanced. The basic plan (Essential plan) starts from\u00a0<strong>225 USD per year for one physical node<\/strong>\u00a0and\u00a0<strong>75 USD per year for one VPS<\/strong>. It seems there is no monthly subscription for Ubuntu servers and desktops. You can view detailed information on all plans\u00a0<a title=\"\" href=\"https:\/\/www.ubuntu.com\/support\/plans-and-pricing\" target=\"_blank\" rel=\"noopener\"><strong>here<\/strong><\/a>.<\/p>\n<p><b>Pros:\u00a0<\/b>Simple. Semi-automatic. No reboot necessary. Free for 3 systems.<\/p>\n<p><b>Cons:\u00a0<\/b>Expensive for 4 or more hosts. No patch rollback.<\/p>\n<p><strong>Enable Canonical Livepatch Service<\/strong><\/p>\n<p>If you want to setup Livepatch service after installation, just do the following steps.<\/p>\n<p>Get a key at\u00a0<a title=\"\" href=\"https:\/\/auth.livepatch.canonical.com\/\" target=\"_blank\" rel=\"noopener\"><strong>https:\/\/auth.livepatch.canonical.com\/<\/strong><\/a>.<\/p>\n<pre>$ sudo snap install canonical-livepatch<\/pre>\n<pre>$ sudo canonical-livepatch enable your-key<i>\r\n<\/i><\/pre>\n<h4 class=\"fittexted_for_content_h4\">Method 7 \u2013 Update the Linux Kernel with KernelCare<\/h4>\n<p><a class=\"\" title=\"\" href=\"http:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/KernelCare.png\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-16161 tc-smart-load-skip tc-smart-loaded\" src=\"http:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/KernelCare.png\" sizes=\"auto, (max-width: 1211px) 100vw, 1211px\" srcset=\"https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/KernelCare.png 1211w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/KernelCare-300x227.png 300w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/KernelCare-768x582.png 768w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/KernelCare-1024x775.png 1024w, https:\/\/www.ostechnix.com\/wp-content\/uploads\/2019\/01\/KernelCare-520x394.png 520w\" alt=\"KernelCare\" width=\"1211\" height=\"917\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.kernelcare.com\/\" target=\"_blank\" rel=\"noopener\"><strong>KernelCare<\/strong><\/a>\u00a0is the newest of all the live patching solutions. It is the product of\u00a0<a href=\"https:\/\/www.cloudlinux.com\/\" target=\"_blank\" rel=\"noopener\">CloudLinux<\/a>. KernelCare runs on Ubuntu and other flavors of Linux. It checks for patch releases every 4 hours and will install them without confirmation. Patches can be rolled back if there are problems.<\/p>\n<p><strong>Cost<\/strong><\/p>\n<p>Fees, per server:\u00a0<strong>4 USD per month<\/strong>,\u00a0<strong>45 USD per year<\/strong>.<\/p>\n<p>Compared to Ubuntu Livepatch, kernelCare seems very cheap and affordable. Good thing is\u00a0<strong>monthly subscriptions are also available<\/strong>. Another notable feature is it supports other Linux distributions, such as Red Hat, CentOS, Debian, Oracle Linux, Amazon Linux and virtualization platforms like OpenVZ, Proxmox etc.<\/p>\n<p>You can read all the features and benefits of KernelCare\u00a0<a href=\"https:\/\/www.kernelcare.com\/update-kernel-linux\/\" target=\"_blank\" rel=\"noopener\"><strong>here<\/strong><\/a>\u00a0and check all available plan details\u00a0<a href=\"https:\/\/www.kernelcare.com\/pricing\/\" target=\"_blank\" rel=\"noopener\"><strong>here<\/strong><\/a>.<\/p>\n<p><strong>Pros:<\/strong>\u00a0Simple. Fully automated. Wide OS coverage. Patch rollback. No reboot necessary. Free license for non-profit organizations. Low cost.<\/p>\n<p><strong>Cons:<\/strong>\u00a0Not free (except for 30 day trial).<\/p>\n<p><strong>Enable KernelCare Service<\/strong><\/p>\n<p>Get a 30-day trial key at\u00a0<a href=\"https:\/\/cloudlinux.com\/kernelcare-free-trial5\" target=\"_blank\" rel=\"noopener\"><strong>https:\/\/cloudlinux.com\/kernelcare-free-trial5<\/strong><\/a>.<\/p>\n<p>Run the following commands to enable KernelCare and register the key.<\/p>\n<pre>$ sudo wget -qq -O - https:\/\/repo.cloudlinux.com\/kernelcare\/kernelcare_install.sh | bash<\/pre>\n<pre>$ sudo \/usr\/bin\/kcarectl --register KEY<\/pre>\n<p>If you\u2019re looking for an affordable and reliable commercial service to keep the Linux Kernel updated on your Linux servers, KernelCare is good to go.<\/p>\n<\/div>\n<\/div>\n<p><a href=\"https:\/\/www.ostechnix.com\/different-ways-to-update-linux-kernel-for-ubuntu\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>JANUARY 7, 2019 In this guide, we have given 7 different ways to update Linux kernel for Ubuntu. Among the 7 methods, five methods requires system reboot to apply the new Kernel and two methods don\u2019t. Before updating Linux Kernel, it is\u00a0highly recommended to backup your important data!\u00a0All methods mentioned here are tested on Ubuntu &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/07\/different-ways-to-update-linux-kernel-for-ubuntu\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Different Ways To Update Linux Kernel For Ubuntu&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7287","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=7287"}],"version-history":[{"count":3,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7287\/revisions"}],"predecessor-version":[{"id":7642,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7287\/revisions\/7642"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=7287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=7287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=7287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}