🔍 See Original Answer on Ask Ubuntu 🔗
systemctl failed to connect to bus - docker ubuntu:16.04 container
August 18, 2016
Edited: July 22, 2017
November 24, 2022
Copy to clipboard: false
Others have reported a similar problem. Start up the terminal and type:
Do you see an environment variable like this?
id -u is enclosed in backticks not single quotes. This variable is reinterpreted into a number usually
1000 for regular users and
0 for super user (sudo).
If the environment variable
XDG_RUNTIME_DIR does not exist you need to create it. The full discussion is in launchpad systemd answers.