Installed Ubuntu 20.04 distro on WSL 2
create wsl.conf
as following:
===============================================================
[automount]
enabled = true
options = "metadata,uid=1000,gid=1000,umask=22,fmask=11,case=off"
mountFsTab = true
crossDistro = true
[network]
generateHosts = false
generateResolvConf = true
[interop]
enabled = true
appendWindowsPath = true
=============================================================
- Setup systemD according to
https://github.com/damionGans/ubuntu-wsl2-systemd-script
- Install core, lxd and some other snaps like microk8s. Everything look fine:
$ snap list
Name Version Rev Tracking Publisher Notes
core18 20210611 2074 latest/stable canonical✓ base
core20 20210429 1026 latest/stable canonical✓ base
lxd 4.15 20840 latest/stable canonical✓ -
microk8s v1.21.1 2262 1.21/stable canonical✓ classic
snapd 2.51.1 12398 latest/stable canonical✓ snapd
Logout
Login again, snaps status is the same
Logout and then terminate running distribution: wsl -t Ubuntu-20.04
Restart: wsl -d Ubuntu-20.04
Check snaps:
$ snap list
Name Version Rev Tracking Publisher Notes
core18 2074 latest/stable canonical✓ broken
core20 1026 latest/stable canonical✓ broken
lxd 4.15 20840 latest/stable canonical✓ -
microk8s 2262 1.21/stable canonical✓ broken
snapd 12398 latest/stable canonical✓ broken
I suspect snap configuration goes into temporary space and does not persist.