Skip to content

Instantly share code, notes, and snippets.

@adv27
Created August 14, 2020 00:55
Show Gist options
  • Save adv27/2b56c24441372891e794da1f2b21dc54 to your computer and use it in GitHub Desktop.
Save adv27/2b56c24441372891e794da1f2b21dc54 to your computer and use it in GitHub Desktop.
Install snap on WSL 2

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

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