Okay, It’s common to have such issues while you are just starting your docker journey. You just installed Docker Engine in your Ubuntu or Debian-based distro. With joy, you ran
docker version only to see your docker engine is not running but giving you an error message on your face like this:
Don’t give up yet the solution is way simpler than you imagined.
sudo chmod 666 /var/run/docker.sock and hit enter in your terminal. Then run
docker version again and voila!