Docker Community Forums

Share and learn in the Docker community.

Cannot bulk stop/remove processes

I am not sure what I am doing wrong, I am on linux ubuntu 20.04

I have never worked with docker before so I am a complete novice

can anyone help me out with this? I would really appreciate it

this is the response i get from the terminal

sudo docker stop $(docker ps -a -q)
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json?all=1: dial unix /var/run/docker.sock: connect: permission denied
"docker rm" requires at least 1 argument.
See 'docker rm --help'.