Skip to content

Instantly share code, notes, and snippets.

@dianaarnos
Last active January 9, 2022 16:57
Show Gist options
  • Save dianaarnos/c8786fd09906940589e2898598d1f64b to your computer and use it in GitHub Desktop.
Save dianaarnos/c8786fd09906940589e2898598d1f64b to your computer and use it in GitHub Desktop.
WSL on Win 11

Run Snap successfully (it fails due to a systemd dependency). Source: microsoft/WSL#5126 (comment)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment