Windows Subsystem for Linux is a great environment for working with Linux tools, applications, utilities, bash command prompt shell, etc., from a Windows environment, as long as you don’t run into “Windows Subsystem for Linux has no installed distributions”. Windows Subsystem for Linux (WSL) is the de facto standard to run Linux distributions from Windows, without the need for a virtual machine platform, such as VirtualBox, Hyper-V, VMware Workstation, etc.
Working with Windows Subsystem for Linux is usually very straightforward but can be a bit quirky from time-to-time. Let’s look at an error you may receive when working with Windows Subsystem for Linux and how you can resolve it.
What is Windows Subsystem for Linux?
Windows Subsystem for Linux is a tool that lets developers, DevOps engineers, and home lab enthusiasts easily access Linux distribution environments from within their Windows host and use the Bash shell for an administrator.
Using WSL, you can run Bash command prompt, shell scripting, Linux applications, and native Linux tools. You can also use it to run internal or external command actions to control remote boxes.
WSL 2 is the newest iteration of Windows Subsystem for Linux that provides many performance and functionality improvements over WSL 1, as it uses an entirely new architecture.
Learn more about Windows Subsystem for Linux here: What is Windows Subsystem for Linux | Microsoft Learn
You can install many different Linux distribution releases, including Ubuntu, Kali Linux, Debian, Arch Linux, and others, depending on which Linux distro you want to install. You can run your installed distributions at the same time in parallel.
Many Ubuntu distributions are found in the Microsoft Store, including the latest release Ubuntu 22.04.1 LTS and lower versions. It is controlled and run from the Windows service called LXSSManager service.
Administrators should make sure not to change the startup type for the service or manually configure it unless troubleshooting on a computer from personal experience.
Installing Windows Subsystem for Linux
The process of installing Windows Subsystem for Linux has changed over the course of the past few months as Windows Subsystem for Linux is now found on the Microsoft Store as a native Store app.
Installing from Microsoft Store
Previously, you had to enable Windows Subsystem for Linux as a Windows optional feature, and then download kernel updates for Linux for WSL 2 before you could use it. However, this has all been streamlined since WSL is now found on the Microsoft Store.
***Note*** you don’t have to have a user account to download the Windows Store app for WSL when visiting the Microsoft Store. Open Microsoft Store, search for “wsl” or “windows subsystem for linux” in the search bar on the Microsoft Store to find the Windows Subsystem for Linux Windows Store app.
Once you click install, it will run the downloading process and install the app.
Legacy installation of Windows Subsystem for Linux, requiring the optional feature
Previous versions of Windows Subsystem for Linux had to be enabled from the Windows optional features, requiring a reboot.
After enabling the Windows feature previously, you were prompted to restart.
Installed WSL previously?
What happens if you have installed the in-operating system version of Windows Subsystem for Linux and now want to install the Microsoft Store app? Actually, you just need to install again from the Microsoft Store app.
Once you install from the Microsoft Store, it will overwrite the in-operating system version of Windows Subsystem for Linux.
To check and make sure you have the Microsoft Store version, press the windows key +R, type cmd, then run the wsl –version command from the command prompt.
You should see something similar to the following:
Windows Subsystem for Linux has no installed distributions error
Many may experience an error of sorts when installing Windows Subsystem for Linux from the Microsoft Store. After launching the installation in the Microsoft Store, users may see the following error message displayed in the command prompt:
Below, you can see the following message. Windows subsystem for linux has no installed distributions error displayed in the command prompt window.
The error code given is wsl service createinstance getdefaultdistro wsl_e_default_distro_not_found. Press any key to continue. However, digging deeply into this is not the answer.
Windows Subsystem for Linux has no installed distributions Fix
Rather than being a showstopper error, if you have experienced the same issue, this message says we have no preferred Linux distribution or installed distributions error message, meaning we need to install Ubuntu or some other Linux distribution.
We need to use the WSL command and install a distribution. Installing Ubuntu is an easy distribution to get up and running with.
You can use the following command to begin the installation of the Ubuntu distribution.
Installing Ubuntu distribution
If you open a Windows Terminal, you can run the WSL command to see the options. However, to install Ubuntu, you can use the following command from the command line:
wsl –install ubuntu
Once you install Ubuntu, it will finish out the installation and then prompt to setup a new unix username in the UNIX shell.
Once you setup the new user account, you will see the Ubuntu prompt provide details of the environment, etc.
Windows Subsystem for Linux FAQs
What is Windows Subsystem for Linux? It is a way to have native access to Linux Bash shell prompt and other Linux tools without the overhead of a virtual machine platform.
How do you install WSL in Windows now? It is now a Windows Store app. Previously, you had to enable the optionalfeature.
How do you install Linux distributions in Windows Subsystem for Linux? Using the WSL command from the terminal or prompt, you can run the wsl –install <distribution> to install a new Linux distribution.
Hopefully, if you are experiencing the Windows subsystem for linux has no installed distributions error after installing WSL from the Windows Store, this little tip will help you to get around this perceived error message.
It is actually fairly intuitive as to the source of the error since it is noting you have yet to install Linux distributions in your WSL installation.
Windows Subsystem for Linux is a great tool that I find myself using more and more as the features and capabilities, and more importantly, the limitations, are becoming less and less. Without WSL, spinning up virtual machines when using Windows or SSH’ing into a remote VM is your only option.