why "systemctl" not working in Ubuntu terminal on Windows?

23k views Asked by At

I need to reload the daemon using systemctl command in ubuntu terminal on window 10. I attached the error I received.

The error:

bashdos@yana:~$ systemctl
System has not been booted with systemd as init system (PID 1). Can't operate.
2

There are 2 answers

0
WSLUser On BEST ANSWER

WSL doesn't have systemd implemented therefore in Ubuntu you need to run for example service start ssh or you can call the binary directly such as /etc/init.d/ssh start/stop/restart.

0
Felipe Augusto On

I had this problem running WSL 2

the solution was the command

 $ sudo dockerd

Open other terminal and try it

 $ docker ps -a

if after that you still have a problem with permission, run the command:

 $ sudo usermod -aG docker your-user