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
Both WSL1 and WSL2's primary conflict with Systemd is the PID1 clash - WSL's init on both versions runs as PID1, which is the main reason Systemd doesn't run on either.
Initial versions of WSL 2 run up to 20x faster compared to WSL 1 when unpacking a zipped tarball, and around 2-5x faster when using git clone, npm install and cmake on various projects.
When using WSL2 you can use:
sudo service docker start
This command basically execute the script /etc/init.d/docker
.
Some customization, like specifying HTTP proxy, is possible via the script /etc/default/docker
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With