How to upgrade Ubuntu 16.04 to 18.04 LTS using CLI

To upgrade Ubuntu 16.04 to 18.04 LTS using the command line interface (CLI), you can follow these steps:

  1. Make sure your system is fully updated by running the following command:
sudo apt update && sudo apt upgrade
  1. Back up your system before you begin the upgrade process. This is important to ensure that you can recover your data in case something goes wrong during the upgrade.
  2. Install the update-manager-core package if it is not already installed by running the following command:
sudo apt install update-manager-core
  1. Set the Prompt value in the /etc/update-manager/release-upgrades file to “normal” by running the following command:
sudo sed -i 's/Prompt=lts/Prompt=normal/g' /etc/update-manager/release-upgrades
  1. Run the following command to start the upgrade process:
sudo do-release-upgrade
  1. Follow the prompts on the screen to complete the upgrade process.
  2. This process may take some time, depending on the speed of your internet connection and the number of packages that need to be upgraded.
  3. When the upgrade process is complete, you will be prompted to reboot your system.
  4. After the reboot, log in and verify the version of Ubuntu with the following command:
lsb_release -a

It’s important to note that this process may require a lot of disk space and bandwidth, and that there may be some hiccups along the way. Before upgrading it is recommended to check the release notes, system requirements and take a full backup of your data.

Leave a Comment