Upgrade Ubuntu 18.04. Learn how to upgrade Ubuntu 18.04 from Ubuntu 16.04 via command line; update Ubuntu from terminal.
“Command Line Way to Upgrade Ubuntu”
Command Line Way to Upgrade Ubuntu
Before upgrading to Ubuntu 18.04, please make sure to update and upgrade the current Ubuntu release using the following commands:
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
Now run the following command to install update-manager-core package:
sudo apt install update-manager-core
Once the update-manager-core package is installed, edit the /etc/update-manager/release-upgrades file and set Prompt value to normal. Prompt=normal
sudo gedit /etc/update-manager/release-upgrades
Now finally, run do-release-upgrade command to upgrade to Ubuntu 18.04:
sudo do-release-upgrade -d
Once upgrade process is finished, restart the system and check the Ubuntu version using the following command:
Upgrading Ubuntu 18.04 from Ubuntu 16.04/17.04/17.10
To upgrade on a desktop system:
- Open the “Software & Updates” Setting in System Settings.
- Select the 3rd Tab called “Updates”.
- Set the “Notify me of a new Ubuntu version” dropdown menu to “For any new version”.
- Press Alt+F2 and type in “update-manager -d” (without the quotes) into the command box.
- Update Manager should open up and tell you: New distribution release ‘18.04’ is available.
- If not you can also use “/usr/lib/ubuntu-release-upgrader/check-new-release-gtk”
- Click Upgrade and follow the on-screen instructions.
To upgrade on a server system:
- Install the update-manager-core package if it is not already installed.
- Make sure the Prompt line in /etc/update-manager/release-upgrades is set to normal.
- Launch the upgrade tool with the command sudo do-release-upgrade.
- Follow the on-screen instructions.
Note that the server upgrade will use GNU screen and automatically re-attach in case of dropped connection problems.
There are no offline upgrade options for Ubuntu Desktop and Ubuntu Server. Please ensure you have network connectivity to one of the official mirrors or to a locally accessible mirror and follow the instructions above.