How to install Docker on Linux (Debian/Ubuntu/Pop!_OS 20.04)

If you are wondering how to install Docker in a Ubuntu based Linux distribution, this post is for you.

Just copy & paste the commands from Method 1, or follow Method 2 to install from a .deb file.

Method 1: Command Line Installation

  1. Make sure no previous docker installation exists in the system
$ sudo apt-get remove docker docker-engine docker.io containerd runc
  1. Update apt packages
$ sudo apt-get update
  1. Enable HTTPS for apt
$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
  1. Add docker identification key
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
  | sudo apt-key add - \
  && sudo apt-key fingerprint 0EBFCD88

pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <docker@docker.com>
sub rsa4096 2017-02-22 [S]

If everything went fine your output must be similar to the above.

  1. Add the stable release repository to your package manager
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \

Note: To find your [arch=<your value>], run dpkg --print-architecture. On modern laptops that will typically be amd64.

  1. Install the latest stable docker version
$ sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io
  1. Verify installation finished correctly
$ sudo docker run hello-world

If your installation was successful, your output should look similar to this:

Unable to find image 'hello-world:latest' locally

[... some installation lines]

Hello from Docker!
This message shows that your installation appears to be working correctly.

[... some more lines]

Method 2: Install From File

If you are coming from Windows, you are probably used to installing things by downloading and running a file.

Pop!_OS comes pre-installed with a fun tool called Eddy that enables you to do just that.

For installing Docker on Pop!_OS 19.04:

  1. Visit the official source
  2. Select the option that equals the result of running dpkg --print-architecture on a terminal
  3. Download and save the .deb file for the latest Docker Engine - Community version
  4. Double click on the .deb file and click install when prompted by Eddy


Installing Docker in Ubuntu based Linux distributions is easy. If you run into difficulties and need additional information, checkout their full installation docs here.