I'm trying to get Ubuntu 20.04 working with WSL2 on Windows 10 Home (10.0.19041 Build 19041) and so set the version to v2 for use with Docker Desktop.
I've set wsl --set-default-version 2
prior to installing Ubuntu 20.04 LTS from the Windows Store.
In the Ubuntu system (via Start Menu) I see:
$ wsl.exe -l -v
NAME STATE VERSION
* docker-desktop Stopped 2
Ubuntu-20.04 Running 1
docker-desktop-data Stopped 2
However, on the Windows host in PowerShell I do not see the Ubuntu distribution:
> wsl -l -v
NAME STATE VERSION
* docker-desktop Stopped 2
docker-desktop-data Stopped 2
Why is the distro missing when running the command from the Windows host?
(Secondarily: I'm unsure why the Ubuntu is set to v1 when I've set the default install to be v2!)
wsl --set-default-version 2
in PowerShell, that was likely also changing the registry settings for that Admin user. Now that you have it running as your user, try running thewsl --set-default-version 2
again, then either install a different distro orwsl --export
andwsl --import
the existing one to make sure it took effect. Also, of course, you can change the existing one withwsl --set-version Ubuntu-20.04 2
, although I still recommend a backup first withwsl --export
.