Enable Ubuntu Pro to get 5 Years More Security Updates in Ubuntu 22.04,20.04,18.04

Last updated: September 1, 2024 — 3 Comments

Ubuntu now provides expanded security maintenance (esm) updates for the packages in main/universe repositories through “Ubuntu Pro” service.

With it, you can get 5 years more (total of 10 years) security updates support for Ubuntu LTS. Meaning Ubuntu 22.04 support until 2032, Ubuntu 20.04 support until 2030, and Ubuntu 18.04 support until 2028.

For Ubuntu Server or Desktop users that use apt upgrade to install updates, you’ll get following prompt in the output:

Get more security updates through Ubuntu Pro with ‘esm-apps’ enabled: …

In this tutorial, I’m going to show you how to get rid of this “esm-apps” prompt by:

  • either enable Ubuntu Pro security updates.
  • or skip the esm-apps updates and disable the command line prompt.

Option 1: Enable Ubuntu Pro Security Updates

For each user, Ubuntu Pro is free for up to 5 machines for personal use! Here’s how to enable it in both graphical and command line ways!

For Ubuntu Desktop

1. For Desktop users, first search for and launch “Software & Updates” tool from ‘Activities’ overview.

2. When it opens, navigate to “Ubuntu Pro” tab, and click on “Enable Ubuntu Pro” button. In the pop-up dialog will show you a short code.

For Ubuntu 18.04, run sudo apt update && sudo apt full-upgrade command first if you don’t see the ‘Ubuntu Pro’ tab.

3. Next, in your web browser go to https://ubuntu.com/pro/attach. Login with your account (create for free if you don’t have one). Finally, enter the code you got in the last step, and then click “Submit”.

4. Finally, go back “Software & Updates” and click “Confirm” (see screenshot in step 2). When done, you’ll see the “Ubuntu Pro support is enabled” text in green. And, you can toggle the options to enable/disable ESM Infra, ESM apps, Kernel Livepatch as you want.

For Ubuntu Server (command line way)

For Server and those who prefer Linux command, this can be done by running a single command in console.

First, in web browser go to https://ubuntu.com/pro/dashboard. Log in with your account (create if you don’t have one), then copy or write down the key token.

Then, in terminal or command console, run:

sudo pro attach KEY_TOKEN_HERE

When done, it outputs the enabled and disabled services in terminal output. You can then run command to enable/disable your desired services:

  • Enable an Ubuntu Pro service.
    sudo pro enable SERVICE_NAME
  • Disable access an Ubuntu Pro service.
    sudo pro disable SERVICE_NAME

In the commands, replace SERVICE_NAME with one of esm-apps, esm-infra, livepatch, realtime-kernel.

To disable Ubuntu Pro, as well as all enabled services, run command:

sudo pro detach

Get Rid of “esm-apps” command line prompt without enabling Ubuntu Pro

UPDATE: if this step does NOT work, try to disable the Ubuntu Pro software sources instead!

If you don’t want to install the expanded security updates, you can also disable the command line prompt by removing the config file.

It’s handled by the “20apt-esm-hook.conf” config file under “/etc/apt/apt.conf.d/” directory.

First, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to navigate to that directory:

cd /etc/apt/apt.conf.d/

Then, create a backup folder to store the config file as backup. So, you can restore the change at any time by moving the file back.

sudo mkdir -p /etc/apt/backup

Finally, moving the config file to backup folder you just created:

sudo mv 20apt-esm-hook.conf /etc/apt/backup/

To apply change, also run sudo apt update.

To restore, run command to move the file back:

sudo mv /etc/apt/backup/20apt-esm-hook.conf /etc/apt/apt.conf.d/ && sudo apt update

That’s all. Enjoy!

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 [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

3 responses to Enable Ubuntu Pro to get 5 Years More Security Updates in Ubuntu 22.04,20.04,18.04

  1. Hi,
    Thank you for your great tutorial.

    How to detach machine if my machine has been reinstalled/crashed? Can I detach from Ubuntu Dashboard? I have not found any menu to detach it from Ubuntu Dashboard

    Thanks

    • If Ubuntu is crashed, you can try to boot into recovery mode and run sudo pro detach command.
      If you forgot to detach before re-installing Ubuntu, then there so far seems no way to detach it. But according to this thread, “we monitor how many active machines you have at any given moment”. Means you can just re-attach the machine after re-installing Ubuntu, it should be 1 machine activated in dashboard. If not, your can report issue to https://bugs.launchpad.net/ubuntu.

      • Hi Ji m,
        Thank you for your reply. This is my first time using Ubuntu Pro. Hope can be implemented on Ubuntu server of my client too :)

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> 

*