Upgrading your Ubuntu OS - Customer Portal Upgrades
- Our Products & Services
- Getting Started
- Accounts
- Communication
- Billing
- Companies
- Financial
- Integrations
- Inventory
- Jobs
- Mapping
- Misc.
- Monitoring
- Purchase Orders
- Release Notes
- Sonar Billing
- Voice
- Reporting
- Security
- sonarPay
- Ticketing
- Working With the Sonar Team & Additional Resources
- System
- Networking
Table of Contents
Upgrading Ubuntu 16.04 to 18.04
Ubuntu is a popular Linux distribution, which is known for its user-friendly interface and the ability to run on almost any hardware. Upgrading your Ubuntu system to the latest version is necessary to keep your system updated with the latest features, security patches, and bug fixes. In this guide, we will discuss how to upgrade Ubuntu 16.04 to 18.04.
Preparing for the Upgrade
Before upgrading your Ubuntu system, it is highly recommended to back up all your important files and folders. This can be done by copying them to an external hard drive or cloud storage service.
To upgrade from Ubuntu 16.04 to 18.04, follow the steps below:
- Open the terminal and update the package list by running the following command:
sudo apt update
- Upgrade the system by running the following command:
sudo apt upgrade
- Install the update-manager-core package by running the following command:
sudo apt install update-manager-core
- Open the /etc/update-manager/release-upgrades file using any text editor and ensure that the value of Prompt is set to LTS. (
Prompt=lts
)
sudo nano /etc/update-manager/release-upgrades
- Start the upgrade process by running the following command:
sudo do-release-upgrade
- Follow the on-screen instructions to complete the upgrade process. If asked, keep locally installed versions of configuration files, except for the
menu.lst
option — install the package maintainers' version, if asked. - If you’re asked ‘Restart services during package upgrades without asking?’ enter y and press the [ENTER] key.
- If you’re asked to ‘Upgrade to LXC snap’ select y and press the [ENTER] key, then if you’re asked for the version, select 4.0 and press the [ENTER] key.
- If asked to remove obsolete packages, enter y and press the [ENTER] key.
- Once the upgrade process is complete, you will be asked to restart your system, press y and press [ENTER] key.
Upgrade Docker to the latest version.
Docker versions < 20.10.9 will need to be upgraded, Ubuntu 16.04 usually ships with Docker 20.10.7, check your docker version with:
docker —version
Install using the apt repository
Before you install Docker Engine for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.
Set up the repository
- Update the
apt
package index and install packages to allowapt
to use a repository over HTTPS:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
- Add Docker’s official GPG key:
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL <https://download.docker.com/linux/ubuntu/gpg> | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
- Use the following command to set up the repository:
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] <https://download.docker.com/linux/ubuntu> "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker Engine
- Update the
apt
package index:
sudo apt-get update
- Install Docker, containerd, and Docker Compose.
To install the latest version, run:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Docker is now installed.