» sudo systemctl daemon-reload

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

 

尝试输入以下指令:

1 sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig
2 
3 sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
4 
5 exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
6 
7 snap version

 

 

 

转载:https://gist.github.com/alyleite/ca8b10581dbecd722d9dcc35b50d9b2b

 

 

 

此操作发生在在win10系统wsl2执行systemctl start docker 报错,也可以直接使用service docker start命令启动