2

a

The above picture shows Canonical livepatch setting in software_properties_gtk. How do I enable/disable the Canonical Livepatch via command line?

Sun Bear
  • 2,078
  • 5
  • 26
  • 70
  • 1
    Livepatch is proprietary software from Canonical. Contact Canonical directly with support questions: https://ubuntu.com/security/livepatch – user535733 Aug 02 '21 at 19:08

1 Answers1

1

I discovered that Canonical Livepatch is a SNAP App called canonical-livepatch.

On command-line, I discovered:

$ canonical-livepatch --help
Incorrect Usage. flag: help requested

NAME:
   canonical-livepatch - canonical livepatch client

USAGE:
   canonical-livepatch [global options] command [command options] [arguments...]

VERSION:
   9.7.2

AUTHOR:
   Canonical Livepatch Team

COMMANDS:
     status                   show kernel's livepatch status
     enable                   enable livepatching on the machine
     disable                  disable livepatching on the machine
     refresh                  immediately download and apply any available livepatch
     config                   configure livepatching on the machine
     kernel-upgrade-required  indicate whether a kernel upgrade is required
     help                     display help

GLOBAL OPTIONS:
   --version, -v  print the version

To disable canonical-livepatch, I simply do:

$ sudo canonical-livepatch disable
Successfully disabled device. Removed machine-token: ################################

To enable canonical-livepatch, the command-line should write:

$ sudo canonical-livepatch enable MACHINE-TOKEN

where MACHINE-TOKEN is provided by canonical. However, I have not found a way to get MACHINE-TOKEN via command-line. It seems to be generated after Livepath is enable in the software_properties_gtk GUI and every enabling creates a unique MACHINE-TOKEN.

Update: Just discovered from this question that the MACHINE-TOKEN can be obtained from https://auth.livepatch.canonical.com/

Sun Bear
  • 2,078
  • 5
  • 26
  • 70