Skip to content

Instantly share code, notes, and snippets.

@Molter
Forked from alyleite/wsl.md
Created May 3, 2022 13:06
Show Gist options
  • Save Molter/feb87cb74398ff1240db262a6d029484 to your computer and use it in GitHub Desktop.
Save Molter/feb87cb74398ff1240db262a6d029484 to your computer and use it in GitHub Desktop.
Failed to connect to bus: Host is down - WSL 2

» 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

just try:

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

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

snap version

@Molter
Copy link
Author

Molter commented May 3, 2022

Make sure you are on WSL 2

wsl --list --verbose
 wsl --set-version Ubuntu 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment