Error: docker: 'daemon' is not a docker command

The binary is called dockerd and is located in /usr/bin/dockerd.
Why would they want to stop docker as a service and then run it with a command? Strange exercise…

I would strongly suggest to do any daemon configuration to the file /etc/docker/daemon.json. If it does not exist, create it.The equivalent of what you try to do with the command is:

{
   "hosts" : [ "tcp://0.0.0.0:2375" ]
}

If the file exists, do not replace it with the example I pasted! Modify the hosts line if existing, add the hosts line , if missing. Keep in mind: this is a json file!

Though, you might want to keep the binding to the docker.sock as well:

{
   "hosts" : [ "tcp://0.0.0.0:2375", "unix:///var/run/docker.sock" ]
}

Then restart the daemon with sudo service docker restart and you are done.

WARNING: everyone who can access your docker machine, will be able to connect to it with a remote docker client or application that implements the docker sdk without authentification. You will not want to enable this, unless you enable certificate auth (see: https://docs.docker.com/engine/security/https/). Even better don’t enable the http socket at all, and leverage docker context, which allows to controll remote docker engines over ssh (see: Docker context problem).