How To Enable Live Patching On Ubuntu 18.04
Updating Linux is a lot easier than updating other operating systems. Instead of staring at a rotating blue loading screen on Windows, Linux users need only enter a few commands, watch some packages install, and go on about their day. However, not all aspects of updating on Linux are without hassle. When it comes to updating the Linux kernel, updates can be a real pain, as they force the user to stop what they’re doing and restart the PC to finish the update. In an effort to decrease annoying restarts, Canonical has added live patching on Ubuntu 18.04.
It’s a new feature that lets users install Linux kernel updates on Ubuntu 18.04 LTS without rebooting. If this sounds like an awesome feature, follow this guide and learn how to enable it on your Ubuntu PC.
Live Patching On Ubuntu 18.04
Installing updates on Ubuntu without restarting isn’t a new feature. On Ubuntu server, this has been a thing for a while. As of Ubuntu 18.04, Canonical has brought this great feature to the desktop. With it, users can install Linux kernel updates without the need to completely restart their PC.
If you hate rebooting your Ubuntu PC and would prefer it stays suspended and accessible at a moments notice, this feature could be very useful. Live Patching isn’t available to users right away, as Ubuntu 18.04 doesn’t enable it by default. Fortunately, it’s very easy to enable.
There are two ways to enable this feature. If you’ve just installed Ubuntu 18.04 for the first time, read the “Welcome” dialog that outlines all of the new features of the release. Click on the “Next” button, and read everything it has to say. On this welcome screen, you’ll see something outlining “Live Patching”. Follow the instructions on the page to enable it.
Live Path Settings
It’s best to turn on this feature upon first installing 18.04 because it’s right in the welcome screen. If you can’t access the welcome screen anymore, you’ll need to turn it on by navigating through the Ubuntu settings. Using traditional Ubuntu with Gnome? Press the Win button on your keyboard and search for “Software & Updates.”
Click the “sign in” button to sign into Canonical. Go through the process of creating an Ubuntu Single Sign-On account, and log into it. Once created, go back to the update settings and check the box next to “Use Canonical Live Patch to increase security between restarts”.
Using Live Patches
Live Patching is a free feature for Ubuntu 18.04 LTS users, though it comes with some conditions. When you sign into the Ubuntu Single Sign-On service, the website generates a unique token that marks your Linux PC. You’ll be able to sign in and access live Patches for free on three separate Ubuntu PC’s. After the third one, it will no longer be free, so be careful how many times you use this feature.
Using the Live Patching feature doesn’t require any special operations. Instead, it works pretty much as expected: as part of normal updating procedure. Updating with the Live Patches feature can be done both with the Ubuntu graphical update utility, and the apt update/upgrade commands in the terminal.
To use, launch the update manager, allow it to check for updates and then install the updates. For updates that normally require a reboot (kernel upgrades and fixes), you’ll no longer need to restart. Obviously, not every update installed via the Ubuntu update manager can promise no reboots 100% of the time, as that’s the nature of computers. Things happen, and you may still run into the occasional update that requires a restart. However, with this feature, it’ll happen a lot less.
Turn Off Live Patching
The Live Patching feature is pretty cool, but not everyone will find it useful. If you don’t want it, it’s best to turn it off. To turn it off, open up “Software & Updates”. Inside the “Software & Updates” window, uncheck the box next to Use Canonical Live Patch to increase security between restarts”.
De-selecting the Live Patch feature should instantly disable it.
Uninstalling Old Kernels
Updating on Ubuntu, even with the Live Patching feature doesn’t mitigate the dozens of Linux kernels that build up over time. On Debian-based Linux distributions, updating the Linux kernel doesn’t automatically uninstall the old one. To get the most out of the new Live Patch feature, it’s a good idea to fully uninstall old kernels when you switch to the new one.
Note: never uninstall a kernel you are currently running or bad things will happen!
Usually, uninstalling old kernels on Ubuntu is a painless process. First, ensure all software is up to date and you’re using the newest version of Ubuntu’s kernel. Next, run the following command to tell the system to get rid of the old kernels.
sudo apt autoremove
Autoremove works well for getting rid of old versions of the Linux kernel, as the system will be able to tell if a kernel isn’t in use and thus is “no longer needed”.
Not ANOTHER friggin’ video. Can’t you just tell us what to do, like … like.. like normal people would tell each other how to do something. Everybody has to video every little thing these days. What a pain.