79432337

Date: 2025-02-12 08:18:40
Score: 2
Natty:
Report link

The solution for this problem mentioned above:

"I get the following message when trying to use systemctl: System has not been booted with systemd as init system (PID 1). Can't operate."

You have to execute this commands in WSL2:

wsl --update

wsl --shutdown

sudo nano /etc/wsl.conf

Add this line if not exists yet: [boot]systemd=true

Save file wsl.conf(Ctrl + X, before Y Enter).

wsl --shutdown

systemctl status docker

Reasons:
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Jfdz911