我如何在使用 su -s 时设法解决问题?

How can I manage to solve an issue while using su -s?

我在使用 Docker 时遇到了一些权限问题,以下文档建议对 运行 使用一些命令,其中之一是 su -s ${USER} 但它不起作用,因为输出是不是没有那种类型的文件或文件夹,你能帮我吗?我在 Ubuntu 16.04

这是我关注的文档 https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket

您可以查看一些 post 安装步骤 here 了解如何允许 docker 运行 有时间 运行 而不是 root。

TLDR 假设您拥有 root 权限

sudo groupadd docker            # add the docker group if not already extant
sudo usermod -aG docker $USER   # add the user to the group docker
exec $SHELL                     # reload your shell