Earlier we have discussed installation of docker on different linux version.Here we are going to add non root user to docker group .docker process use root user pervilage to connect.docker command create a unix group called as docker if it is added in the group otherwise it look sudo previlage.
In my installation post i have run docker and other commands a root user .To avoid this we are adding normal user to add into the group.
docker group and add user “techtransit” . i had create a user “techtransit” in my machine.
Steps are :
- Log into your system with sudo or root previlage.
- Run below command command to create group and add your user or here i am adding techtransit in the group through below command.
# usermod -aG docker techtransit
- Exit from currently user and log in from techtransit user or your user which is added in docker group.
- Check and Verify below command without sudo .
# docker run hello-world
That’s All!, Thanks ..
I am a professional freelance contributor and founder of tech transit. Love to write and lover of education, culture, and community. I have been using it, setting, supporting, and maintaining it since 2009.Linux rocks!