System has not been booted with systemd as init system (PID 1). Can't operate
这是一个Windows11上 WSL2的一个问题
我是在安装snap的时候,发现snapd服务无法开启
下面是解决方法
键入ubuntu
sudo vim /etc/wsl.conf
添加下面的配置并保存退出
[boot]
systemd=true
输入exit退出ubuntu,然后输入下面的命令关闭ubuntu
wsl --shutdown
然后重启ubuntu
sudo systemctl status