why systemd is disabled in WSL?

4/8/2019

None of the systemd commands are working inside WSL( Ubuntu Bash 18.04). When I ran sudo systemctl is-active kubelet, error is output: System has not been booted with systemd as init system (PID 1). Can't operate. : running command: sudo systemctl is-active kubelet

How to enable systemd feature in WSL? Whats the way to get rid of System has not been booted with systemd

-- Santosh Hegde
kubernetes
minikube
ubuntu
ubuntu-18.04
windows-subsystem-for-linux

2 Answers

4/8/2019

Systemd is not supported in WSL at this time. More information can be found with this GitHub issue.

Furthermore, Docker does not (at the time of writing this) work on top of WSL, which means Kubelet won't be of much use. In order to run Kubernetes locally, you can use Docker for Windows which includes Kubernetes support, or you can use Minikube to run a VM with Hyper-V or Virtualbox.

-- DWSR
Source: StackOverflow

5/19/2020

Nowadays you can try:

sudo service docker start

when using WSL2, if you are running on windows version 2004 or higher (I assume).

-- Francisco Susana Canela
Source: StackOverflow