Apply kernel patches without rebooting

1. Overview

The Ubuntu Livepatch Service applies critical kernel security patches without rebooting. This is especially useful on production environments and services where downtime is disruptive.

Livepatch is free for up to 5 machines with an Ubuntu Prosubscription.

This tutorial will show you how to enable this service on your Ubuntu system.

What you’ll need

  • A computer running Ubuntu LTS with an Internet connection
  • Ubuntu Pro subscription
  • Some basic command-line knowledge

2. Getting the Ubuntu Pro token

In order to use this service, you have to attach your subscription via the Ubuntu Pro token. On public cloud marketplace Pro instances the subscription is already attached and you should skip this step.

To attach subscription, simply visit the Pro dashboard.

The dashboard will show your subscription credentials and instructions to apply them on the system. Follow the instructions and attach the system to your Ubuntu Advantage or Free subscription. It is as simple as

$ sudo pro attach [TOKEN]

3. Enabling Livepatch

Livepatch is enabled by default when attaching a subscription. You can verify your subscription status with the pro status command.

If livepatch is disabled, you can enable it with the following command:

$ sudo pro enable livepatch

You can ensure that the Livepatch service is working properly by running:

$ canonical-livepatch status --verbose

4. Conclusion