When using WSL in the morning, an error was reported:
root@PC0:/home/zhang# systemctl start ssh.service
System has not been booted with systemd as init system (PID 1). Can't operate.
This error report is easy to solve. The solution is to use Service code>:
root@PC0:/home/zhang# service ssh status
* sshd is running
Then I try to shut down:
root@sidanzhang-PC0:/home/zhang# poweroff
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to talk to init daemon.
True pit, shut down all report wrong.
According to this answer: rebooting Ubuntu on windows without rebooting windows?- super user
the solution is to open a new window of PowerShell and run the command:
wsl --shutdown
If your win10 system has not been updated, the administrator can run the following command:
net stop LxssManager