I'm trying to use the systemctl
command in a ubuntu:16.04
docker container. I'm running the following command...
systemctl status ssh
However I'm getting the error...
Failed to connect to bus: No such file or directory
Why is this not working? Is this related to Ubuntu running in a docker container? How can I get systemctl
to work correctly?
service ssh start
sudo systemctl --user
... just remove thesudo
!systemctl
aliased tosudo systemctl --no-pager
. Thanks for the tip.