HI
I am using windows server 2019 and i have installed WSL and trying to restart docker
sudo systemctl restart docker
getting below error
System has not been booted with systemd as init system (PID 1). Can’t operate.
Share and learn in the Docker community.
HI
I am using windows server 2019 and i have installed WSL and trying to restart docker
sudo systemctl restart docker
getting below error
System has not been booted with systemd as init system (PID 1). Can’t operate.
WSL does not run Systemd as it’s init system. You should be able to use the ‘service’ equivalent (service docker restart). There are lots of posts about this that you can easily find to understand Microsoft’s reasoning. It is possible to run WSL2 with Systemd but that requires some tweaks and tbh unless you have a really pressing need for that and can accept some level of unpredictable behaviour, I would stay away from that approach. AFAIK, MS has no plans to support Systemd in WSL and they set out their reasons for this pretty clearly imho.