How To

Upgrade Ubuntu 16.04 to 18.04 Bionic Beaver: Step-by-Step Guide

Ubuntu 18.04 LTS (Bionic Beaver) was released on April 26, 2018, with five years of official support through April 2023. If you are still running Ubuntu 16.04, upgrading gives you a newer kernel, updated packages, improved hardware support, and continued security updates.

The upgrade is handled by the do-release-upgrade tool, which automates most of the heavy lifting. Plan for some downtime — the process can take anywhere from 30 minutes to an hour depending on the number of installed packages and your internet speed.

<strong>Prerequisite:</strong>&nbsp;You need sudo access. Always perform a full backup before a major OS upgrade.

Back Up and Update Before the Upgrade

Before anything else, back up your important data. If Ubuntu is running on a virtual machine, take a full system snapshot. This gives you a clean restore point if anything goes wrong mid-upgrade.

Once your backup is done, update all currently installed packages to their latest versions:

bashsudo apt updatesudo apt upgrade

Then run a distribution upgrade. This handles major dependency changes and removes packages that are no longer needed:

bashsudo apt dist-upgrade

Upgrade Ubuntu 16.04 to 18.04 with do-release-upgrade

If the do-release-upgrade tool is not installed, add it now:

bashsudo apt install update-manager-core

Start the upgrade:

bashsudo do-release-upgrade

If you are running this over SSH, the tool will warn you and ask whether to continue. It will start a second SSH daemon on port 1022 as a recovery fallback. If you run a firewall, temporarily open that port before proceeding. Type y to continue when prompted.

Once the tool calculates all the changes, it shows a summary of how many packages will be installed, upgraded, or removed and the total download size. Type y to confirm and begin the upgrade.

Handle Prompts and Confirm the New Version

During the upgrade, you may be asked about configuration files that were modified after installation:

Configuration file '/etc/sysctl.conf'  What would you like to do about it?    Y or I : install the package maintainer's version    N or O : keep your currently-installed version

If you have not made custom changes to the file, type Y. If you have, type N to keep your version. When asked to remove obsolete packages, type y to clean them up.

After all packages are installed, the tool asks you to reboot. Type y to restart the machine.

After the system comes back up, reconnect via SSH and verify the new version:

bashlsb_release -a
Description: Ubuntu 18.04 LTSRelease:     18.04Codename:    bionic

If you see Ubuntu 18.04 LTS in the output, the upgrade completed successfully.

Your server is now running Ubuntu 18.04 LTS (Bionic Beaver). You can start exploring the updated packages, new kernel features, and improved tooling. Leave a comment below if you run into any issues during the process.

Cyber Defence

Recent Posts

Install and Configure Redis on Ubuntu 18.04: Remote Access Guide

Redis is an open-source, in-memory data structure store used as a database, cache, and message broker.…

47 minutes ago

Set Up Apache Virtual Hosts on Ubuntu 18.04: Complete Guide

Apache Virtual Hosts let you run multiple websites on a single server. Each site gets its…

1 hour ago

Install Django on Ubuntu 18.04: Python venv Setup Guide

Django is a free, open-source Python web framework built for developing secure, scalable, and maintainable web…

1 hour ago

Configure MySQL Master-Slave Replication on Ubuntu 18.04

MySQL replication is the process of automatically copying data from one database server to one or…

2 hours ago

Install Joomla on Ubuntu 18.04 with Apache: LAMP Stack Guide

Joomla is one of the most popular open-source content management systems in the world. It is…

1 day ago

Install WordPress on Ubuntu 18.04 with Apache: LAMP Stack Guide

WordPress is the most popular open-source content management system in the world, powering over a quarter…

1 day ago