2 Ways to Upgrade From Ubuntu 16.04/17.10 To Ubuntu 18.04 (Graphical & Terminal)

Ubuntu 18.04 Bionic Beaver is released on April 26, 2018. This tutorial will be showing you 2 ways to upgrade from Ubuntu 16.04/17.10 to Ubuntu 18.04: using the graphical update manager and using the command line. Normally you use the graphical update manager to upgrade Ubuntu desktop and use command line to upgrade Ubuntu server, but the command-line method works for desktops too.

Note that you can upgrade a LTS directly to a newer LTS only after the first point release of the new LTS is released, which means after Ubuntu 18.04.1 is released, Ubuntu 16.04 can directly upgrade to Ubuntu 18.04. The first point release for an LTS comes out 3 months after the initial release. If you can’t wait that long, you can first upgrade to Ubuntu 17.10, then follow the steps below to upgrade to Ubuntu 18.04. As with any OS upgrade, please back up your important data before beginning the upgrade.

Upgrade Ubuntu 16.04/17.10 to Ubuntu 18.04 with the Graphical Update Manager

First of all, fire up a terminal window and run the following command to update existing software packages.

sudo apt update && sudo apt dist-upgrade

Please note that if a new kernel is installed while running the above command, you need to reboot system in order to continue the upgrade process. Then issue the following command in terminal.

update-manager -d

After checking for updates, the update manager will tell you that Ubuntu 18.04 is now available. Click the Upgrade button.

how to upgrade from ubuntu 17.10 to ubuntu 18.04

Then enter your password.

upgrade from ubuntu 17.10 to ubuntu 18.04

The release notes window appears. Click Upgrade.

upgrade from ubuntu 16.04 to ubuntu 18.04

Wait for the upgrade process to finish. If you are notified that some third-party sources are disabled, accept it. You can re-enable them after the upgrade is finished.

upgrade ubuntu to version 18.04

During this process, you might be told some packages are no longer supported by Canonical and some packages will be removed. You can click details to see what packages is going to be removed. Once you are ready, click the Start Upgrade button.

upgrade to ubuntu 18.04 LTS

While installing the upgrades, I was asked to restart xscreensaver and xlockmore. Simply clicking the Forward button will suffice.

update ubuntu 16.04 to 18.04

Once the upgrade is complete, restart your computer. At the login screen, you can click the cog icon to select GNOME, GNOME with Wayland, or Unity desktop environment.

To check your Ubuntu version, run

lsb_release -a

Output:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04 LTS
Release:	18.04
Codename:	bionic

Upgrade Ubuntu 16.04/17.10 to Ubuntu 18.04 From Command Line

You can use command line to upgrade Ubuntu desktop or a headless server. Speaking of servers, it is recommended that you upgrade Ubuntu on a test server before doing it on a production server. Some server software such as iRedMail (mail server software suite) may not support Ubuntu 18.04 yet. In that case, it is advisable to wait sometime for the software to support Ubuntu 18.04.

If you use SSH to log into your Ubuntu server, it’s a good idea to keep your OpenSSH session alive by adding the following two lines in /etc/ssh/sshd_config file on your server.

ClientAliveInterval 300
ClientAliveCountMax 2

Save and close the file. Then restart SSH daemon.

sudo systemctl restart ssh

To upgrade to Ubuntu 18.04, first run the following command to upgrade existing software.

sudo apt update && sudo apt dist-upgrade

Then make sure you have update-manager-core package installed.

sudo apt install update-manager-core

After that, run the following command to begin the upgrade process.

do-release-upgrade -d

Then follow the on-screen instruction to upgrade to Ubuntu 18.04. Once the upgrade is finished, reboot your Ubuntu desktop or server. To check your Ubuntu version, run:

lsb_release -a

Output:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04 LTS
Release:	18.04
Codename:	bionic

You also need to re-enable third-party repositories such as PPA because they are disabled during upgrade.

Upgrade Ubuntu 16.04 Directly to 18.04 Without Waiting for the First Point Release

Later I found out that there is actually a way to upgrade LTS directly to the next LTS without waiting 3 months. I tried this method on one of my Ubuntu 16.04 system and it worked! But keep in mind that this does pose a potential risk to the system, so if you want to try it out, first backup your important data.

Once you are ready to upgrade, open Software & Updates from Unity Dash or your favorite application menu.

upgrade ubuntu 16.04 to 18.04

Select the Updates tab and then at the bottom set notification to For long-term support versions.

ubuntu 16.04 to 18.04

Next, run the following command in a terminal window.

update-manager -d

The update manager will tell you that Ubuntu 18.04 is available and you can click the upgrade button to start the upgrade process.

If you want to upgrade from the command line, then edit /etc/update-manager/release-upgrades file.

sudo nano /etc/update-manager/release-upgrades

Set prompt to lts.

update ubuntu lts to lts

Save and close the file. Then run the following command to start the upgrade process.

do-release-upgrade -d

Troubleshooting

While I was upgrading Ubuntu 17.10 to 18.04 on my Linode VPS, I encountered the following message.

No valid mirror found

While scanning your repository information no mirror entry for the
upgrade was found. This can happen if you run an internal mirror or
if the mirror information is out of date.

Do you want to rewrite your 'sources.list' file anyway? If you choose
'Yes' here it will update all 'artful' to 'bionic' entries.
If you select 'No' the upgrade will cancel.
Continue [yN]

Don’t worry. Just answer y to continue. It will be Okay.

That’s it! I hope this tutorial helped you upgrade to Ubuntu 18.04 from Ubuntu 16.04/17.10. As always, if you found this post useful, then subscribe to our free newsletter to get new tutorials. Take care!

Rate this tutorial
[Total: 28 Average: 3.9]