關於 Windows 子系統 WSL ubuntu18.04 無法使用 sudo systemctl restart docker

weixin_44953227發表於2020-11-06

報錯: System has not been booted with systemd as init system (PID 1). Can’t operate.


重啟 docker 守護程式報錯

root@DESKTOP-04S0A5K:/etc/init.d# sudo systemctl restart docker
System has not been booted with systemd as init system (PID 1). Can't operate.
root@DESKTOP-04S0A5K:/etc/init.d#

可以嘗試使用

sudo service docker restart

或者使用

sudo /etc/init.d/docker restart

解決

更多關於 WSL 問題可以去: https://github.com/microsoft/WSL/issues

相關文章