Issue
Command wsl --list --verbose
returns the following list on my Windows machine:
$ wsl --list --verbose
NAME STATE VERSION
* docker-desktop-data Running 2
Ubuntu Running 2
docker-desktop Running 2
I have installed Docker Desktop on my machine. What is the difference between docker-desktop
, docker-desktop-data
and my WSL distro Ubuntu
? Should Ubuntu
not be selected as my WSL distribution?
P.S. If I select another entry from list with wsl --setdefault <name-of-distro>
I do not notice significant changes. It confuses me more!
Solution
Should Ubuntu not be selected as my wsl?
Yes, it should. First up, I would recommend:
wsl --set-default Ubuntu
Your example in the question was missing the hyphen, so that may be why it didn't have any effect.
This should change the default distribution to Ubuntu. Without that, the wsl
command (by itself, or with many arguments) will fail, since docker-desktop-data
is not designed to be booted. See WSL issue #8727 for some more detail on that.
The problem often happens when Docker Desktop is installed before Ubuntu, or when Ubuntu was never properly set as default.
After setting it as default, confirm it with wsl -l -v
again.
Then a simple wsl
should start Ubuntu.
What is the difference between
docker-desktop
,docker-desktop-data
and my WSL distroUbuntu
?
Ubuntu
is the WSL distribution here for daily use. It doesn't have to be Ubuntu, but that is the default with WSL. This is where you should install packages and run your normal shell.docker-desktop
is a distribution supplied and managed by Docker Desktop that contains the Docker Engine. When started, Docker Desktop will start bothUbuntu
anddocker-desktop
, injecting some links into Ubuntu so that it will be able to use thedocker
commands correctly.docker-desktop
is managed by the Docker Desktop application. You shouldn't modify it. Any changes you make will likely be lost the next time Docker Desktop upgrades.docker-desktop-data
is a non-bootable distribution that contains Docker volumes, containers, images, etc. It is also managed by Docker Desktop.
Answered By - NotTheDr01ds Answer Checked By - Senaida (WPSolving Volunteer)