2 Answers 35 Show activity on this post. You can use the following: grep /etc/group -e "docker" grep /etc/group -e "sudo" Follow this answer to receive notifications answered Oct 7, 2016 at 15:27 Farhad FarahiFarhad Farahi38.5k7 gold badges78 silver badges74 bronze badges 18 Show activity on this post. Docker creates the docker group, but also any sudoers can use Docker, so you need to check two group memberships: getent group sudo getent group docker Follow this answer to receive notifications answered Oct 7, 2016 at 15:13 Elton StonemanElton Stoneman19k5 gold badges49 silver badges45 bronze badges