The WSL CLI window disappears directly after it has opened -- how to fix that?

Solution 1:

Given your wsl -l -v output, it looks like the docker-desktop-data instance got set as the default when you uninstalled Ubuntu. That's not actually a bootable instance, since it has no /init in it.

That hopefully will explain why the wsl command is exiting. Just running wsl.exe (from PowerShell, CMD, or the Start Menu) is attempting to launch docker-desktop-data and then immediately exits.

You should be able to fix it by executing wsl --set-default Ubuntu from PowerShell or CMD. If not, we can dig deeper.