System has not been booted with systemd as init system (PID 1) | failed to connect to bus: host is down wsl2 #linuxtopic

System has not been booted with systemd as init system (PID 1) | failed to connect to bus: host is down wsl2 #linuxtopic
System has not been booted with systemd as init system (PID 1)


I have Ubuntu 20.4 in Windows ( WSL2 ), when in reloading any service I'm getting below error

Error: 

failed to connect to bus: host is down

failed to connect to bus: host is down wsl2

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

Solution :

1 – Update the system

sudo apt-get update

2 – Install below package

sudo apt-get install -yqq daemonize dbus-user-session fontconfig

3 – execute below command to fix the issue

sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target

exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

4 – check the version

snap version

Enjoy!

Now we can restarted the system service without error,


Thanks you !! 
I hope this topic gave you all the information you needed. If you have any further questions or would like more detailed directions feel free to contact us using any of the following sources.We look forward to talking to you.

No comments

Powered by Blogger.