linux - Can't add user to docker group - Stack Overflow (https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (Stack Overflow) (/opensearch.xml) (https://stackoverflow.com/questions/56305613/cant-add-user-to-docker-group) (https://cdn.sstatic.net/Shared/stacks.css?v=619122b796ae) (https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=02dcb5186b90) (Feed for question 'Can't add user to docker group') (/feeds/question/56305613) (https://cdn.sstatic.net/Shared/Channels/channels.css?v=5981bb1a5bd7) (https://accounts.google.com/gsi/style) (site logo) Join Stack Overflow By clicking “Sign up”, you agree to our (/legal/terms-of-service/public) terms of service and acknowledge you have read our (/legal/privacy-policy) privacy policy . (e2a58aec89e0105273f31cf44dffd45d868462dc661de60a7d67e669a7370ceb) (1) (undefined) (2.0) Sign up with Google Sign up with GitHub OR (e2a58aec89e0105273f31cf44dffd45d868462dc661de60a7d67e669a7370ceb) (1) (undefined) Email Password (8+ characters (at least 1 letter & 1 number)) Sign up Already have an account? (/users/login) Log in (e2a58aec89e0105273f31cf44dffd45d868462dc661de60a7d67e669a7370ceb) () Skip to main content (https://stackoverflow.com) Stack Overflow (https://stackoverflow.co/) About Products (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav-bar&utm_content=overflowai) OverflowAI (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-for-teams) Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-advertising) Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-ai) OverflowAI GenAI features for Teams (https://stackoverflow.co/api-solutions/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-api) OverflowAPI Train & fine-tune LLMs (https://stackoverflow.co/labs/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=labs) Labs The future of collective knowledge sharing (https://stackoverflow.co/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=about-the-company) About the company (https://stackoverflow.blog/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=blog) Visit the blog (Search…) () Loading… (https://stackoverflow.com) current community (https://stackoverflow.com) (Stack Overflow) Stack Overflow (https://stackoverflow.com/help) help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) chat (https://meta.stackoverflow.com) (Meta Stack Overflow) Meta Stack Overflow your communities (https://stackoverflow.com/users/signup?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f56305613%2fcant-add-user-to-docker-group) Sign up or (https://stackoverflow.com/users/login?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f56305613%2fcant-add-user-to-docker-group) log in to customize your list. (https://stackexchange.com/sites) more stack exchange communities (https://stackoverflow.blog) company blog (Click to show search) (https://stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f56305613%2fcant-add-user-to-docker-group) Log in (https://stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f56305613%2fcant-add-user-to-docker-group) Sign up (/) Home (/questions) Questions (/tags) Tags (/users) Users (https://stackoverflow.com/jobs/companies?so_medium=stackoverflow&so_source=SiteNav) Companies Labs (/jobs?source=so-left-nav) Jobs (/beta/discussions) Discussions Collectives Communities for your favorite technologies. (/collectives-all) Explore all Collectives Teams Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat. (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=overflowai-learn-more) Learn more (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Explore Teams Teams Ask questions, find answers and collaborate at work with Stack Overflow for Teams. (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams-compact) Explore Teams Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. (/collectives) Learn more about Collectives Teams Q&A for work Connect and share knowledge within a single location that is structured and easy to search. (https://stackoverflow.co/teams/) Learn more about Teams Get early access and see previews of new features. (https://stackoverflow.co/labs/) Learn more about Labs (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (/questions/56305613/cant-add-user-to-docker-group) Can't add user to docker group (/questions/ask) Ask Question (2019-05-25 14:13:34Z) Asked 5 years, 3 months ago Modified (?lastactivity) (2024-07-16 11:14:02Z) 1 month ago (Viewed 89,806 times) Viewed 90k times This question shows research effort; it is useful and clear (70:3:31e,16:ef8a10de28b8be13,10:1725173908,16:997c63e53d05268b,8:56305613,3b9e858e792319d9aa31defe241fb5ff656fceb08e4789893dd38d159748ca14) 38 (This question does not show any research effort; it is unclear or not useful) (70:3:31e,16:dbe99adfdd54a0ec,10:1725173908,16:9d7fe45f3b58b681,8:56305613,8da02b0477d33bdefe4d3c08f294ffc8207d66e401dcf59c3922bc37f16791e9) Save this question. (/posts/56305613/timeline) Show activity on this post. I'm trying to set docker up on a new system, and when running docker info I get: docker -v => Docker version 18.09.5, build e8ff056 docker info => 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.39/info: dial unix /var/run/docker.sock: connect: permission denied Following the docs, I've tried: sudo usermod -a -G docker $USER Which returns no output. When I then run groups: groups => mark adm cdrom sudo dip plugdev lpadmin sambashare I can see a docker group exists: less /etc/group | grep docker => docker:x:131:mark And can see that it owns a socket running where the error message states: ls -la /var/run/ | grep docker => drwx------ 5 root root 120 May 25 14:54 docker -rw-r--r-- 1 root root 5 May 25 14:54 docker.pid srw-rw---- 1 root docker 0 May 25 14:54 docker.sock So why can't I add myself to that group with sudo usermod -a -G docker $USER ? (/questions/tagged/linux) (show questions tagged 'linux') linux (/questions/tagged/ubuntu) (show questions tagged 'ubuntu') ubuntu (/questions/tagged/usergroups) (show questions tagged 'usergroups') usergroups (/q/56305613) (Short permalink to this question) Share Share a link to this question Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/56305613/edit) () Improve this question Follow (70:3:31e,16:9e981faa190d7163,10:1725173908,16:d7d5a3b83cd23ec4,8:56305613,e30f29a04d595273649f55a87a132dd7583cd63789dc49934c241bfeec276aac) Follow this question to receive notifications (/posts/56305613/revisions) (show all edits to this post) edited (2024-06-20 23:18:41Z) Jun 20 at 23:18 (/users/7123660/benjamin-loison) (Benjamin Loison's user avatar) (/users/7123660/benjamin-loison) Benjamin Loison (reputation score) 5,536 (4 gold badges) 4 4 gold badges (18 silver badges) 18 18 silver badges (37 bronze badges) 37 37 bronze badges asked (2019-05-25 14:13:34Z) May 25, 2019 at 14:13 (/users/6535997/mark) (Mark's user avatar) (/users/6535997/mark) Mark Mark (reputation score) 6,336 (5 gold badges) 5 5 gold badges (23 silver badges) 23 23 silver badges (50 bronze badges) 50 50 bronze badges 4 (number of 'useful comment' votes received) 11 I believe you need to login/restart for the changes to be completed. – (/users/7925098/omari-celestine) (1,435 reputation) Omari Celestine Commented (2019-05-25 14:18:29Z, License: CC BY-SA 4.0) May 25, 2019 at 14:18 (number of 'useful comment' votes received) 1 Your belief is correct, thanks! – (/users/6535997/mark) (6,336 reputation) Mark Commented (2019-05-25 14:34:41Z, License: CC BY-SA 4.0) May 25, 2019 at 14:34 On Ubuntu 20.04, in my case, "login/restart" literally meant I needed to _reboot_ for the changes to take effect, not merely restart the bash session. Wowzers. – (/users/1286760/4z4t4r) (2,418 reputation) 4Z4T4R Commented (2021-02-20 23:58:52Z, License: CC BY-SA 4.0) Feb 20, 2021 at 23:58 One gotcha to watch for is that you run groups to check if you've been added to the docker group whereas you probably need to run groups $USER . This is since according to man groups "if no USERNAME is specified, [groups will display groups] for the current process (which may differ if the groups database has changed)" – (/users/6619692/anil) (1,294 reputation) Anil Commented (2023-01-17 14:04:37Z, License: CC BY-SA 4.0) Jan 17, 2023 at 14:04 (Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.) Add a comment | (Expand to show all comments on this post) 6 Answers 6 Sorted by: (/questions/56305613/cant-add-user-to-docker-group?answertab=scoredesc#tab-top) Reset to default (scoredesc) Highest score (default) (trending) Trending (recent votes count more) (modifieddesc) Date modified (newest first) (createdasc) Date created (oldest first) This answer is useful (70:3:31e,16:2b2ccb1637758917,10:1725173908,16:970ea669ad897e48,8:57867754,76166f1d0cef52b448bbc622fe30cefcfbca95e9d6669280b99bbcd0f5797348) 52 (This answer is not useful) (70:3:31e,16:4176e477590865ca,10:1725173908,16:7d87efbd85597bc7,8:57867754,2dc63f1eb8d1cf85954b8aef1384b0319f8e70f202f0da86e2242a732dc69a28) Save this answer. (Loading when this answer was accepted…) (/posts/57867754/timeline) Show activity on this post. You need to reload your shell in order to make the changes take effect. Often you need to reboot your shell process and possibly even restart your computer. e.g sudo usermod -aG docker $USER sudo reboot See @4Z4T4R answer and give a thumbs (https://stackoverflow.com/a/66297855/7961500) https://stackoverflow.com/a/66297855/7961500 Load changes without quitting your shell To avoid starting a new shell you can run. (Doesn't seem to work for all environments) exec su -l $USER This will create a new subshell with the loaded changes and replace your current shell with it. If you need it to work now without restarting your computer Another way if you just need to get it working now, is to change your primary group. This is only a temp solution as with any new shell you will need to apply it again. export my_group=$(id -gn) newgrp docker newgrp $my_group Documentation You can also look at the offical documentation here (https://docs.docker.com/engine/install/linux-postinstall/) https://docs.docker.com/engine/install/linux-postinstall/ (/a/57867754) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/57867754/edit) () Improve this answer Follow (70:3:31e,16:01835ac0c71a0762,10:1725173908,16:00c329bb1df1989a,8:57867754,7933790ed8f2e4a752711a818f69479e1171ee8cbb0ed6fc88383f2d1cd31116) Follow this answer to receive notifications (/posts/57867754/revisions) (show all edits to this post) edited (2024-06-20 23:18:26Z) Jun 20 at 23:18 (/users/7123660/benjamin-loison) (Benjamin Loison's user avatar) (/users/7123660/benjamin-loison) Benjamin Loison (reputation score) 5,536 (4 gold badges) 4 4 gold badges (18 silver badges) 18 18 silver badges (37 bronze badges) 37 37 bronze badges answered (2019-09-10 09:23:35Z) Sep 10, 2019 at 9:23 (/users/7961500/louis-stekhoven-smith) (Louis Stekhoven-Smith's user avatar) (/users/7961500/louis-stekhoven-smith) Louis Stekhoven-Smith Louis Stekhoven-Smith (reputation score) 1,119 (14 silver badges) 14 14 silver badges (10 bronze badges) 10 10 bronze badges 5 (number of 'useful comment' votes received) 3 restarting the shell did not work for me, but newgrp docker did. Any idea why that would happen? – (/users/2903532/reynoldsnlp) (1,200 reputation) reynoldsnlp Commented (2020-08-11 21:38:21Z, License: CC BY-SA 4.0) Aug 11, 2020 at 21:38 (number of 'useful comment' votes received) 2 Same issue here on ubuntu 20.04, newgrp docker seemed to work for me. sudo usermod -a -G docker $USER seemed to work periodically, but after reboot the group was lost. – (/users/24718/monkut) (43,466 reputation) monkut Commented (2020-08-12 08:53:19Z, License: CC BY-SA 4.0) Aug 12, 2020 at 8:53 (this comment was edited 1 time) (number of 'useful comment' votes received) 1 Exactly the same problem on Ubuntu 19.10, for me only newgrp docker fixes it, but it's not persistent – (/users/424150/chuckatron) (186 reputation) Chuckatron Commented (2020-09-09 20:51:27Z, License: CC BY-SA 4.0) Sep 9, 2020 at 20:51 (number of 'useful comment' votes received) 3 The newgrp command is very different from usermod -aG GROUP USER : the latter adds group GROUP to USER, without changing the primary group of USER; the newgrp creates a new shell and in that shell, the USER's primary group changes to GROUP! This is not likely the desired effect: the OP still wants files created by USER to belong to user's primary GROUP, but wants files owned by GROUP to be accessible by USER. Very completely different. – (/users/869951/oliver) (28,989 reputation) Oliver Commented (2021-02-06 14:48:11Z, License: CC BY-SA 4.0) Feb 6, 2021 at 14:48 That is true, I updated the post to help maintain the same behaviour. It is not the ideal way to solve this issue but is a final option if nothing else is working for you. At this point even the offical docker documentation suggests doing this. I added the link to the post. – (/users/7961500/louis-stekhoven-smith) (1,119 reputation) Louis Stekhoven-Smith Commented (2021-02-08 03:32:23Z, License: CC BY-SA 4.0) Feb 8, 2021 at 3:32 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:6f9b06ca97dede98,10:1725173908,16:c71d3ea12b7a990d,8:66297855,5985dc5f31ba07bfc8e765c1b44fe3f3767d3911069306da7b2d1ae28be0a0c1) 17 (This answer is not useful) (70:3:31e,16:da1d1ff7bf276b9e,10:1725173908,16:efdb0f05bbfdc850,8:66297855,e031f6f0ab302e3c05604f7bd3e7b31bde078e87faa2344b84c80d5ec4deffbd) Save this answer. (Loading when this answer was accepted…) (/posts/66297855/timeline) Show activity on this post. In my case, on Ubuntu 20.04, run sudo reboot after this command: $ sudo usermod -aG docker $USER I literally needed to reboot my operating system (and machine) for the change to take effect. Restarting/reloading the bash session did not apply the new setting. Sure, newgrp docker does the trick "on the fly" without restart/reboot/re-anything... but once the session terminates, POOF you're not in the docker group any longer. Added this as a formal answer bc it genuinely solved the OP's---and my (identical)---problem. Credit should go to @Omari Celestine for the suggestion, but because I suck at interpretation, I (and maybe you) need the literal disambiguation that this answer provides. (/a/66297855) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/66297855/edit) () Improve this answer Follow (70:3:31e,16:06980426aafc4cbc,10:1725173908,16:64308e2a00a9d960,8:66297855,03a9495e510dd1bd702e7fc4cf652e8b8dab2f296e183c7cbd68a18091f9390a) Follow this answer to receive notifications answered (2021-02-21 00:05:06Z) Feb 21, 2021 at 0:05 (/users/1286760/4z4t4r) (4Z4T4R's user avatar) (/users/1286760/4z4t4r) 4Z4T4R 4Z4T4R (reputation score) 2,418 (2 gold badges) 2 2 gold badges (27 silver badges) 27 27 silver badges (45 bronze badges) 45 45 bronze badges 1 I tried the usermod & reboot & doesn't work for me, the only thing working is newgrp docker – (/users/2431204/kisai) (313 reputation) kisai Commented (2022-05-12 21:08:29Z, License: CC BY-SA 4.0) May 12, 2022 at 21:08 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:566ff9368fb5e05a,10:1725173908,16:daf73153e3022a28,8:72571258,08161003b6dd50c8560ed34f88bf5de875715eb3428504ec94669e211420eed9) 3 (This answer is not useful) (70:3:31e,16:24e2588e9f3117a3,10:1725173908,16:83888a47d66239ba,8:72571258,a922ef82f44297ad0c9f0eaf8bfd56dc48a0364e1feeceb7b0720a11d8d1ad47) Save this answer. (Loading when this answer was accepted…) (/posts/72571258/timeline) Show activity on this post. Its a two step process technically. Run sudo usermod -aG docker $USER then, sg docker -c "bash" (/a/72571258) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/72571258/edit) () Improve this answer Follow (70:3:31e,16:20d2f7fe33783f43,10:1725173908,16:22766a952a1aabc4,8:72571258,ccafa50091aca369cead2fcd961e27ceb16a6eb8dcae4036fc215f21c592f69a) Follow this answer to receive notifications (/posts/72571258/revisions) (show all edits to this post) edited (2024-06-20 23:17:40Z) Jun 20 at 23:17 (/users/7123660/benjamin-loison) (Benjamin Loison's user avatar) (/users/7123660/benjamin-loison) Benjamin Loison (reputation score) 5,536 (4 gold badges) 4 4 gold badges (18 silver badges) 18 18 silver badges (37 bronze badges) 37 37 bronze badges answered (2022-06-10 08:28:08Z) Jun 10, 2022 at 8:28 (/users/7240363/saurabh-kumar) (Saurabh Kumar's user avatar) (/users/7240363/saurabh-kumar) Saurabh Kumar Saurabh Kumar (reputation score) 2,589 (18 silver badges) 18 18 silver badges (19 bronze badges) 19 19 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:84c21f413ec4b973,10:1725173908,16:bbdd205ce4601286,8:75000868,f32203705a3d4b0b2923217343f0bd8f7149defe7a1616f4b423e4d73396da0d) 0 (This answer is not useful) (70:3:31e,16:8a57f3e544118ebd,10:1725173908,16:51a24bcb59eaf4fc,8:75000868,f81ae6cb4e99ab0143caa47d5d874d0b0224c9a4b906a1005e9ba2fe59c2629d) Save this answer. (Loading when this answer was accepted…) (/posts/75000868/timeline) Show activity on this post. Change the permissions on the /var/run/docker.sock file and restart docker process. sudo chown jenkins:jenkins /var/run/docker.sock sudo 644 /var/run/docker.sock Then, sudo service docker restart (/a/75000868) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/75000868/edit) () Improve this answer Follow (70:3:31e,16:81300dc4f251a75e,10:1725173908,16:00d9e1451aaa6e03,8:75000868,05b36786b1cacec34b5d5d1e1eab976a707373ec45cfeae7e8f8ad12cd6c8270) Follow this answer to receive notifications answered (2023-01-04 04:09:03Z) Jan 4, 2023 at 4:09 (/users/12562413/sri) (Sri's user avatar) (/users/12562413/sri) Sri Sri (reputation score) 9 (1 bronze badge) 1 1 bronze badge 1 Your answer could be improved with additional supporting information. Please (https://stackoverflow.com/posts/75000868/edit) edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers (/help/how-to-answer) in the help center . – (/users/3649352/kunal-varpe) (453 reputation) Kunal Varpe Commented (2023-01-04 07:41:38Z, License: CC BY-SA 4.0) Jan 4, 2023 at 7:41 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:eefcbeae552317c1,10:1725173908,16:2e1a9bb23902006b,8:78754233,f66de06084a49e563ecbdf4eb97a4f6c8e57dd5d856a62ffe5503f6ecec98f0c) 0 (This answer is not useful) (70:3:31e,16:002dcd1640414078,10:1725173908,16:1fd11d72f4b59801,8:78754233,1e17f8a328b07b3a41d8c22916c1b2290a85ac60677ffcbec5ea4a97adbabc04) Save this answer. (Loading when this answer was accepted…) (/posts/78754233/timeline) Show activity on this post. Try this sudo groupadd docker sudo usermod -aG docker $USER newgrp docker Restart is required for the changes to take effect. (/a/78754233) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/78754233/edit) () Improve this answer Follow (70:3:31e,16:a12e259d21e16d29,10:1725173908,16:0c36f156499cb71b,8:78754233,b040dc96f90c1a1676e4aa2f59034986c95b148d056dc34d73b458f696a46769) Follow this answer to receive notifications answered (2024-07-16 11:14:02Z) Jul 16 at 11:14 (/users/323015/subhashis) (subhashis's user avatar) (/users/323015/subhashis) subhashis subhashis (reputation score) 4,772 (8 gold badges) 8 8 gold badges (39 silver badges) 39 39 silver badges (55 bronze badges) 55 55 bronze badges (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) This answer is useful (70:3:31e,16:93fcc9501567d8ec,10:1725173908,16:b3098237629c0f2d,8:68289520,e700bfd64635fe45a158fc1372f46df7b172e9dbeb5d75a5c3b33a14284a48d8) -4 (This answer is not useful) (70:3:31e,16:9dbabe493cd02783,10:1725173908,16:3aff2301a5ec7a5e,8:68289520,2c1b82237697a14c0f46e627dcc73410f6773d4f16d51539e7b457b27cedc2db) Save this answer. (Loading when this answer was accepted…) (/posts/68289520/timeline) Show activity on this post. Before running $docker info, Please make sure that the docker service up. If not pls start the service by running below command. $service docker start Now you check the $docker info (/a/68289520) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/68289520/edit) () Improve this answer Follow (70:3:31e,16:133eb2e8e0727bf1,10:1725173908,16:064e543be5c5eb31,8:68289520,87e89f86ce157a60f912c203c309eb45c8da2f8ee0673848c763b721420c4e24) Follow this answer to receive notifications answered (2021-07-07 16:09:43Z) Jul 7, 2021 at 16:09 (/users/16400731/arrow) (Arrow's user avatar) (/users/16400731/arrow) Arrow Arrow (reputation score) 1 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) (56305613) (false) () Your Answer Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. (/help/gen-ai-policy) Learn more (true) Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question . Provide details and share your research! But avoid … Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our (/help/how-to-answer) tips on writing great answers . Draft saved Draft discarded (e2a58aec89e0105273f31cf44dffd45d868462dc661de60a7d67e669a7370ceb) Sign up or (/users/login?ssrc=question_page&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f56305613%2fcant-add-user-to-docker-group%23new-answer) log in Sign up using Google Sign up using Email and Password (false) (false) Submit Post as a guest Name () () Email Required, but never shown () () Post as a guest Name () () Email Required, but never shown () () Post Your Answer Discard By clicking “Post Your Answer”, you agree to our (https://stackoverflow.com/legal/terms-of-service/public) terms of service and acknowledge you have read our (https://stackoverflow.com/legal/privacy-policy) privacy policy .(1) Not the answer you're looking for? Browse other questions tagged (/questions/tagged/linux) (show questions tagged 'linux') linux (/questions/tagged/ubuntu) (show questions tagged 'ubuntu') ubuntu (/questions/tagged/usergroups) (show questions tagged 'usergroups') usergroups or (/questions/ask) ask your own question . The Overflow Blog (https://stackoverflow.blog/2024/08/30/mobile-observability-open-telemetry-embrace-ios-android-austin-emmons/?cb=1) (Mobile Observability: monitoring performance through cracked screens, old batteries, and crappy Wi-Fi) Mobile Observability: monitoring performance through cracked screens, old... Featured on Meta (Meta Stack Exchange) (https://meta.stackexchange.com/questions/401324/announcing-a-change-to-the-data-dump-process?cb=1) Announcing a change to the data-dump process (Meta Stack Exchange) (https://meta.stackexchange.com/questions/402121/bringing-clarity-to-status-tag-usage-on-meta-sites?cb=1) Bringing clarity to status tag usage on meta sites (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/431331/what-does-a-new-user-need-in-a-homepage-experience-on-stack-overflow?cb=1) What does a new user need in a homepage experience on Stack Overflow? (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/431399/staging-ground-reviewer-motivation?cb=1) Staging Ground Reviewer Motivation (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/431273/feedback-requested-how-do-you-use-tag-hover-descriptions-for-curating-and-do-yo?cb=1) (Feedback requested: How do you use tag hover descriptions for curating and do you use the RSS feed feature?) Feedback requested: How do you use tag hover descriptions for curating and do... Linked (https://stackoverflow.com/q/78589135?lq=1) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/78589135/i-need-to-add-my-user-to-docker-group-each-time-i-open-console-how-to-solve-thi?noredirect=1&lq=1) I need to add my user to docker group each time I open console, how to solve this issue? Related (https://stackoverflow.com/q/35659707?rq=3) (Question score (upvotes - downvotes)) 13 (https://stackoverflow.com/questions/35659707/how-do-i-add-a-container-user-to-a-user-group-in-the-docker-host?rq=3) How do I add a container user to a user group in the Docker host? (https://stackoverflow.com/q/44762394?rq=3) (Question score (upvotes - downvotes)) 25 (https://stackoverflow.com/questions/44762394/groupadd-command-not-found-in-docker-container-even-though-i-install-it-and-i?rq=3) "groupadd: Command not found" in docker container even though I install it and I am root (https://stackoverflow.com/q/44871049?rq=3) (Question score (upvotes - downvotes)) 7 (https://stackoverflow.com/questions/44871049/docker-run-user-group-not-working-as-expected?rq=3) Docker run - User group not working as expected? (https://stackoverflow.com/q/53373592?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/53373592/default-user-not-added-to-docker-group-have-to-do-su-user?rq=3) default user not added to docker group, have to do su $USER? (https://stackoverflow.com/q/62841011?rq=3) (Question score (upvotes - downvotes)) 5 (https://stackoverflow.com/questions/62841011/docker-image-add-user-to-group?rq=3) Docker image - add user to group (https://stackoverflow.com/q/64311753?rq=3) (Question score (upvotes - downvotes)) 3 (https://stackoverflow.com/questions/64311753/problem-with-the-user-and-group-inside-a-container?rq=3) Problem with the User and Group inside a container (https://stackoverflow.com/q/65146644?rq=3) (Question score (upvotes - downvotes)) 1 (https://stackoverflow.com/questions/65146644/linux-user-groups-missing-when-user-mounted-to-container?rq=3) Linux user groups missing when user mounted to container (https://stackoverflow.com/q/65859589?rq=3) (Question score (upvotes - downvotes)) 22 (https://stackoverflow.com/questions/65859589/run-addgroup-adduser-get-option-s-is-ambiguous-shell-system-error?rq=3) RUN addgroup / adduser. Get: Option s is ambiguous (shell, system) error (https://stackoverflow.com/q/69829338?rq=3) (Question score (upvotes - downvotes)) 0 (https://stackoverflow.com/questions/69829338/how-do-i-add-the-local-users-to-my-docker-container?rq=3) How do I add the local users to my docker container? (https://stackoverflow.com/q/70369278?rq=3) (Question score (upvotes - downvotes)) 10 (https://stackoverflow.com/questions/70369278/how-to-add-the-current-user-to-the-docker-group-on-macos?rq=3) How to add the current user to the Docker group on macOS? (https://stackexchange.com/questions?tab=hot) Hot Network Questions (Philosophy Stack Exchange) (https://philosophy.stackexchange.com/questions/116682/how-can-one-be-honest-with-oneself-if-one-is-oneself) How can one be honest with oneself if one IS oneself? (Travel Stack Exchange) (https://travel.stackexchange.com/questions/191103/duties-when-bringing-canadian-goods-to-us-in-luggage) Duties when bringing Canadian goods to US in luggage (Arqade) (https://gaming.stackexchange.com/questions/409307/wii-u-single-disc-not-working) WII U Single disc not working (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/723922/how-is-message-waiting-conveyed-to-home-pots-phone) How is message waiting conveyed to home POTS phone (English Language & Usage Stack Exchange) (https://english.stackexchange.com/questions/625583/word-for-a-collection-of-awards-such-as-an-olympic-athlete-s-earned-medals) Word for a collection of awards, such as an Olympic athlete’s earned medals (The Workplace Stack Exchange) (https://workplace.stackexchange.com/questions/198982/should-you-refactor-when-there-are-no-tests) Should you refactor when there are no tests? (Biblical Hermeneutics Stack Exchange) (https://hermeneutics.stackexchange.com/questions/97561/which-mosaic-law-was-in-the-backdrop-of-ceremonial-hand-washing-in-mark-7) Which Mosaic law was in the backdrop of ceremonial hand-washing in Mark 7? (Operations Research Stack Exchange) (https://or.stackexchange.com/questions/12439/seinfeldisms-in-o-r) Seinfeldisms in O.R (Computational Science Stack Exchange) (https://scicomp.stackexchange.com/questions/44505/fast-algorithm-to-obtain-an-orthogonal-vector-to-a-set-of-vectors) Fast algorithm to obtain an orthogonal vector to a set of vectors (History Stack Exchange) (https://history.stackexchange.com/questions/76671/how-did-oswald-mosley-escape-treason-charges) How did Oswald Mosley escape treason charges? (Mathematics Stack Exchange) (https://math.stackexchange.com/questions/4965529/is-there-a-way-to-define-a-function-over-the-complex-numbers-that-satisfies-a-l) Is there a way to define a function over the complex numbers, that satisfies a log property? (Unix & Linux Stack Exchange) (https://unix.stackexchange.com/questions/782766/cannot-open-and-html-file-stored-on-ram-disk-with-a-browser) Cannot open and HTML file stored on RAM-disk with a browser (Physics Stack Exchange) (https://physics.stackexchange.com/questions/826367/what-counts-as-the-earths-mass-at-which-point-would-it-increase-or-decrease) What counts as the Earth's mass? At which point would it increase or decrease? (Bicycles Stack Exchange) (https://bicycles.stackexchange.com/questions/95292/felt-vr40-2020) Felt VR40 - 2020 (Worldbuilding Stack Exchange) (https://worldbuilding.stackexchange.com/questions/261286/what-unique-phenomena-would-be-observed-in-a-system-around-a-hypervelocity-star) What unique phenomena would be observed in a system around a hypervelocity star? (Ask Ubuntu) (https://askubuntu.com/questions/1525051/does-it-pay-to-put-effort-in-fixing-this-problem-or-better-reinstall-ubuntu-24-0) Does it pay to put effort in fixing this problem or better reinstall Ubuntu 24.04 from scratch? (Science Fiction & Fantasy Stack Exchange) (https://scifi.stackexchange.com/questions/291246/what-story-starts-off-with-the-character-waking-up-in-a-battlefield-with-wolves) What story starts off with the character waking up in a battlefield with wolves and vultures and snow? (Academia Stack Exchange) (https://academia.stackexchange.com/questions/213289/how-much-new-mathematics-should-we-learn-during-the-phd-are-the-courses-we-take) How much new mathematics should we learn during the PhD? Are the courses we take during the PhD really important? (Worldbuilding Stack Exchange) (https://worldbuilding.stackexchange.com/questions/261336/causal-reconciliation-is-this-a-viable-way-for-my-ftl-system-to-preserve-the-co) Causal Reconciliation: Is this a viable way for my FTL system to preserve the course of History? (Mathematica Stack Exchange) (https://mathematica.stackexchange.com/questions/306611/generate-vectors-with-a-certain-property) Generate vectors with a certain property (Code Review Stack Exchange) (https://codereview.stackexchange.com/questions/293557/coding-exercise-to-represent-an-integer-as-words-using-python) Coding exercise to represent an integer as words using python (Mathematics Stack Exchange) (https://math.stackexchange.com/questions/4965309/why-does-average-of-monte-carlo-simulations-not-hold-for-simple-problem) Why does average of Monte Carlo simulations not hold for simple problem? (Philosophy Stack Exchange) (https://philosophy.stackexchange.com/questions/116626/what-is-opinion) What is opinion? (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/723967/what-is-the-purpose-of-these-33-ohm-series-resistors-on-the-rmii-side-of-the-lan) What is the purpose of these 33-ohm series resistors on the RMII side of the LAN8742A? (/feeds/question/56305613) (Feed of this question and its answers) Question feed Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader. (https://stackoverflow.com/feeds/question/56305613) () (https://stackoverflow.com) (https://stackoverflow.com) Stack Overflow (/questions) Questions (/help) Help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) Chat (https://stackoverflow.co/) Products (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=teams) Teams (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=advertising) Advertising (https://stackoverflow.co/advertising/employer-branding/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=talent) Talent (https://stackoverflow.co/) Company (https://stackoverflow.co/) About (https://stackoverflow.co/company/press/) Press (https://stackoverflow.co/company/work-here/) Work Here (https://stackoverflow.com/legal) Legal (https://stackoverflow.com/legal/privacy-policy) Privacy Policy (https://stackoverflow.com/legal/terms-of-service/public) Terms of Service (/contact) Contact Us Cookie Settings (https://stackoverflow.com/legal/cookie-policy) Cookie Policy (https://stackexchange.com) Stack Exchange Network (https://stackexchange.com/sites#technology) Technology (https://stackexchange.com/sites#culturerecreation) Culture & recreation (https://stackexchange.com/sites#lifearts) Life & arts (https://stackexchange.com/sites#science) Science (https://stackexchange.com/sites#professional) Professional (https://stackexchange.com/sites#business) Business (https://api.stackexchange.com/) API (https://data.stackexchange.com/) Data (https://stackoverflow.blog?blb=1) Blog (https://www.facebook.com/officialstackoverflow/) Facebook (https://twitter.com/stackoverflow) Twitter (https://linkedin.com/company/stack-overflow) LinkedIn (https://www.instagram.com/thestackoverflow) Instagram Site design / logo © 2024 Stack Exchange Inc; user contributions licensed under (https://stackoverflow.com/help/licensing) CC BY-SA . rev 2024.8.29.14628 By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our (https://stackoverflow.com/legal/cookie-policy) Cookie Policy . Accept all cookies Necessary cookies only Customize settings