run docker daemon ubuntu code example

Example 1: how to restart docker linux

$ sudo systemctl start docker

Example 2: Start the Docker daemon

sudo systemctl start docker
sudo service docker start

Example 3: install docker in ubuntu

$ sudo apt-get remove docker docker-engine docker.io
$ sudo apt-get update
$ sudo apt install docker.io
$ sudo snap install docker
$ docker --version

Example 4: how to start docker in ubuntu

systemctl start docker
# to start docker from terminal

Example 5: install docker on ubuntu with

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"