Home Linux How to install and configure Docker on Linux?

How to install and configure Docker on Linux?

How to install and configure Docker on Linux

Docker is a container-based software application or platform that is used as a Service where users can build their own containerized applications. Once an application is completed, other machines can easily view or access these containers. The virtualization concept is used in Docker that provides isolated containers for different tools and software. Docker containers used well-defined specific channels to collaborate with each other.

Today, we will know how to install and configure this containerized based tool Docker on a Linux system. We have executed all steps on Ubuntu 20.04 in this article. So, using the following method you can easily install Docker and configure it on the Linux system.

Also Read:15 Best Linux Applications that You MUST HAVE in 2019


Make sure that you should have sudo command privileges or should be logged in from the administrative root account for Docker installation.

We will explain how you can download, install, enable, or disable docker on reboot or startup to your system in the rest of the article. Moreover, we will also show you how you can change the user’s permissions for using this application in the following steps:

Step 1: Update and Upgrade packages

Open the terminal application by pressing ‘Ctrl+Alt+t’. Using the following commands update and upgrade your system apt packages:

$ sudo apt update

If you need then, upgrade packages so, that all packages should up-to-date.

$ sudo apt upgrade

Step 2: Install Docker

The following command you have to enter on the terminal that will automatically download and install docker with all its dependencies on your system:

$ sudo apt install docker.io

Install docker

Step 3: Enable Docker

Using the following quite easy command, you can start the Docker. This command enables it after every reboot of your system.

$ sudo systemctl enable --now docker

Also Read: Cloud Native Computing a Modern Way to Develop

Type the following command to verify the status:

$ sudo systemctl status docker

If you want to do disable again then, using the following command you can disable the docker on your system:

$ sudo systemctl disable --now docker

Step 4: Set Allow Users Permissions

In this step, we will guide you that how to give certain permissions to any user using the Docker tool. You can replace “samreena” with the account name used to whom you are giving specific permission. However, run the following command to do this:

$ sudo usermod -aG docker Samreena

Step 5: Check installed Docker Version

To check the installed Docker application version, you can execute the following command:

$ docker --version

Step 6: Test Docker

Once you installed Docker on your system, you can test its working by using the following command that will open a container and will execute the Hello World command:

$ docker run hello-world

You will see the above hello-world latest image pulled from the latest library/hello-world.

Also Read: How to Install Django on Ubuntu Linux


As we know that Docker is a useful software application for collaborating with third-party software tools. So, in this article, we have seen the installation and configuration of Docker on the Ubuntu 20.04 Linux system. This tool is well defined and established a secure communication channel for collaboration. It is important and useful, therefore Docker is becoming more popular every day.

About the Author:

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. He blogs at http://linuxways.net/.