Skip to content

Instantly share code, notes, and snippets.

@rlan
Last active May 12, 2022 13:40
Show Gist options
  • Select an option

  • Save rlan/a06ec5b2ff6dbfe77037fb7dfdb9a4bc to your computer and use it in GitHub Desktop.

Select an option

Save rlan/a06ec5b2ff6dbfe77037fb7dfdb9a4bc to your computer and use it in GitHub Desktop.
Upgrading Ubuntu 16.04 LTS to 20.04 LTS

Summary: Need to upgrade to 18.04 first, then to 20.04.

Launch tmux before ssh into the vm, in case local network or vpn has issue, the vm continues to run your commands.

tmux new -s vm
ssh username@vm

Inside vm:

sudo apt update
sudo apt install update-manager-core
sudo apt upgrade

Make sure the Prompt line in /etc/update-manager/release-upgrades is set to 'normal' if you want non-LTS upgrades, or 'lts' if you only want LTS upgrades.

sudo do-release-upgrade

Say yes to many prompts. At the end say Yes to reboot.

ssh into vm again. It should say Ubuntu 18.04.

sudo do-release-upgrade -d

Say yes to many prompts. At the end say Yes to reboot.

ssh into vm again. It should say Ubuntu 20.04.

Source: Upgrading ubuntu 16.04 to 18.04. https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes

Source: Upgrading ubuntu 18.04 to 20.04. https://wiki.ubuntu.com/FocalFossa/ReleaseNotes

@miladjahandideh

Copy link
Copy Markdown

Tnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment