8

I'm trying to get WSL 2 working on my Windows 10 machine. I have followed the "Manual" directions in this page:

https://learn.microsoft.com/en-us/windows/wsl/install-win10#set-your-distribution-version-to-wsl-1-or-wsl-2

And then downloaded 2 different Ubuntu distros linked in this page:

https://learn.microsoft.com/en-us/windows/wsl/install-manual

I set the default version to WSL 2.

After invoking "Add-AppxPackage" (with no errors) and restarting, the WSL still reports that I have no installed distributions.

See:

WSL No Installed Disributions

I have confirmed that all Hyper-V options have been enabled in Windows Features, along with Virtual Machine Platform, and Windows Subsystem for Linux.

I have tried "wsl /install" but it simply reports the same "Windows Subsystem for Linux has no installed distributions."

I have tried Add-AppxPackage with both administrator rights and non adminstrator rights with no difference.

How can I get WSL to allow me to install a distro?

4
  • It looks like you did a wsl --list --verbose at some point - What was the result of that command? My first hunch was that perhaps the distribution was installed, but not set as default. But that doesn't fit for two reasons - First, Microsoft's error messages are usually smarter than that. And second, even after setting an unused WSL instance to default, and then deleting it, WSL automatically set a different distro as default. So I'm suspecting there's always a default distro set for WSL. Commented Jan 19, 2021 at 22:50
  • Also I would recommend reposting this over on Unix & Linux Stack Exchange or perhaps Super User. It's really more appropriate on one of those sites since it doesn't cover a programming question. Commented Jan 19, 2021 at 22:51
  • Thank you for your comments @NotTheDr01ds. I didn't realize that I needed to "run" the Ubuntu application from the operating system to get it to finish the install. Once I did that, it showed up in my WSL. Thanks!!!
    – Bill Gregg
    Commented Jan 20, 2021 at 20:35
  • Tips learned from experience: 1. leave Windows for a few minutes to catch up - you know how it is - let it rest and take a breather, it's getting old these days - of course, *nix is a lot older but Linux was born again I guess, and Windoze knows it's losing and doesn't want to admit it 2. reboot, restart, whatever they call it - you know Windows, right? it just might need another reboot or so and then when you come back with a cup of tea, there it is, a prompt saying Enter new UNIX username: and WSL is ready.
    – NeilG
    Commented May 4, 2023 at 13:44

3 Answers 3

9

After performing all of the steps above, I noticed that "Ubuntu 18.04 LTS" was in my "Recently Added" programs list in the start menu. Double clicking on it finished the installation.

0

You loaded your distro from the Windows Store, but did you Open it from the Windows Store?

You need to do this to go through the install process, during which you'll create a username and password.

Once you've done this, you should see Ubuntu (or your other distro of preference) listed in wsl -l -v as running, along with the WSL version under which it's running.

Incidentally, if you find it's running under WSL 1 although you'd set the default to WSL 2, use wsl -l -v to get its exact name, then use wsl --set-version MY-DISTRO-NAME 2 (replacing MY-DISTRO-NAME with that exact name given before). Your current instance will be terminated and WSL will spend the next few minutes converting the distro.

1
  • "You loaded your distro from the Windows Store, but did you Open it from the Windows Store?" I did precisely that, and got the msg "no installed distributions." I then ran wsl --install --Ubuntu-20.4, which at least tried to install. The next error msg was "The operation could not be started because a required feature is not installed." Lots of help; what feature? Commented Dec 12, 2022 at 2:35
0

I had the same problem this evening, then I realize I didn't open Ubuntu app after downloading wsl. enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.