WSL运行systemctl命令报错

Systemd支持

运行systemctl命令报错

System has not been booted with systemd as init system (PID 1). 
Can't operate. Failed to connect to bus: Host is down

WSL默认不支持systemd,需要手动开启

# 将以下内容添加到/etc/wsl.conf
[boot]
systemd=true

使用wsl --shutdown 重启 WSL

你可能感兴趣的:(WSL运行systemctl命令报错)