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


cron is a systemd service which you can still run in WSL. See this answer as a guide for how you might setup your kubelet application:

To expand on this link, you can modify Windows startup to load WSL with the background services minimized:


Nowadays you can try:

sudo service docker start

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


To run systemd inside WSL2, clone the following repo:

git clone https://github.com/DamionGans/ubuntu-wsl2-systemd-script.git

Run the cloned script:

cd ubuntu-wsl2-systemd-script
bash ubuntu-wsl2-systemd-script.sh

Restart Ubuntu shell then try running the command systemctl to make sure systemd is working.


There is a cool workaround to enable systemd in WSL. Worked for me. Please refer here

Also, for Docker, make sure you have the latest version of it installed and WSL2 is running at least on Windows version 2004. Also make sure to enable WSL2 support in Docker settings.

  • 3
    Link only answers are considered low quality and they become obsolete if the link is changed, moved, or deleted. You should edit your answer and make sure that the essential parts of your solution are in your answer here. Nobody should actually have to visit any link to understand your solution. askubuntu.com/tour
    – Nmath
    Oct 14 '20 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.