-1
$ docker run -it --name systemd-tutorial ubuntu
root@306c0deb6960:~# systemctl
bash: systemctl: command not found

why??

The systemctl utility, which is available by default in Ubuntu, can be used to list services in Ubuntu 22.04 using the command “systemctl –no-pager”.

my version:

root@306c0deb6960:~# cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
...

1 Answers1

0

why?

Containers, typically used for single -service jobs, typically come without the full systemd suite of service management, which would have trouble running without access to the system dbus, anyway. So, this is kind of expected.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94