Upgrading to Ubuntu 22.04 LTS

Note: Upgrade to 22.04 LTS from 20.04 LTS will not be detected until 2022-08-04.

Follow these instructions to upgrade to Ubuntu 22.04 from the command line.
It's recommended to perform these commands over Lish terminal or equivalent in case of disconnect.
Linode provides access to Lish via the Linode Manager (Linodes -> Launch LISH Console).