Upgrading to Ubuntu 22.04 LTS

Follow these instructions to upgrade to Ubuntu 22.04 LTS 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).

After upgrading if apache does not start you may need to disable PHP 7.4 and enable PHP 8.1

# sudo a2dismod php7.4

# sudo a2enmod php8.1

# sudo apachectl restart

PHP 8.1 itself is bit stricter. No more short tags e.g. <? and functions like count() no longer accept empty values. One way around it is to force an array type e.g. count((array)$foo)

You can find fatal errors from the Apache Error Logs under Server Logs in ServerWand.