To upgrade Ubuntu 16.04 to 18.04 LTS using the command line interface (CLI), you can follow these steps:
- Make sure your system is fully updated by running the following command:
sudo apt update && sudo apt upgrade
- 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.
- Install the update-manager-core package if it is not already installed by running the following command:
sudo apt install update-manager-core
- 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
- Run the following command to start the upgrade process:
sudo do-release-upgrade
- Follow the prompts on the screen to complete the upgrade process.
- This process may take some time, depending on the speed of your internet connection and the number of packages that need to be upgraded.
- When the upgrade process is complete, you will be prompted to reboot your system.
- 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.