On Mon, 8 Jun 2020 at 07:12, Gordon Messmer <gordon.messmer(a)gmail.com> wrote:
> - I found that [1] does a pretty good job replacing /usr/bin/systemctl
> [1]
https://github.com/gdraheim/docker-systemctl-replacement
I only use WSL for an interactive shell, so I haven't needed to do much
of anything with systemd. Does it not run in WSL, out of curiosity?
No, because systemd needs to be PID 1, and WSL has its own init that
knows how to connect stuff back and forth. That script aims to emulate
systemctl and allows you to run services in a systemd-based image.
It's not perfect (I found e.g. that some child processes are not
properly killed), but it works reasonably well.
For WSL2, there's the same issue, and there's another workaround:
https://github.com/arkane-systems/genie
--
Iñaki Úcar