Resolving 'No Installed Distributions' Error in WSL on Windows 10: An In-Depth Analysis and Practical Guide Using lxrun Command

Dec 02, 2025 · Programming · 11 views · 7.8

Keywords: Windows Subsystem for Linux | lxrun command | Ubuntu installation

Abstract: This article addresses the 'Windows Subsystem for Linux has no installed distributions' error encountered by Windows 10 users when attempting to use Bash. It provides a detailed solution by analyzing the workings of the lxrun command and the WSL architecture, exploring alternative installation methods when Linux distributions are not visible in the Windows Store. The article includes complete command-line steps, configuration processes, and troubleshooting tips to successfully install Ubuntu and set up a UNIX user account.

Problem Background and Error Analysis

When users attempt to run Bash via the Windows Subsystem for Linux (WSL) on Windows 10, they may encounter an error message stating "Windows Subsystem for Linux has no installed distributions." This error typically directs users to the Windows Store for installation, but some find no distributions available there. This issue is particularly common in specific versions like Windows 10 Enterprise Insider Preview, indicating that the standard installation process may fail due to system configuration or version differences.

Core Solution: Detailed Explanation of the lxrun Command

To resolve this, the best practice is to use the lxrun /install command for manual installation. This command is a legacy configuration tool from early WSL versions, designed specifically for installing the traditional Ubuntu distribution. When the Windows Store fails to provide distributions, lxrun bypasses the store interface by directly downloading and extracting the filesystem.

Upon execution, the system outputs a warning that lxrun.exe is only for configuring legacy WSL distributions and prompts the user to continue. After entering "y," the process downloads the Ubuntu filesystem from the Microsoft Store, which may take several minutes depending on network speed and system performance. Once downloaded, the system automatically extracts the files and proceeds to localization configuration.

Installation Process and Configuration Steps

The installation involves the following key steps:

  1. Localization Setup: The system asks whether to match the Ubuntu locale to the Windows locale (e.g., en-FI), with the default being en_US. Users can choose "y" or keep the default as needed.
  2. User Account Creation: The system prompts for creating a default UNIX user account. The username does not need to match the Windows username, enhancing security and flexibility. Users must enter the username and password twice for confirmation.
  3. Installation Completion: After successfully creating the account, the system displays "Installation successful!" and provides a link to WSL documentation (https://aka.ms/wsldocs) for further reference.

Here is a simplified code example demonstrating the command-line interaction for installation:

C:\WINDOWS\system32>lxrun /install
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore

This will install Ubuntu on Windows, distributed by Canonical and licensed under its terms available here:
https://aka.ms/uowterms

Type "y" to continue: y
Downloading from the Microsoft Store... 100%
Extracting filesystem, this will take a few minutes...
Would you like to set the Ubuntu locale to match the Windows locale (en-FI)?
The default locale is en_US.
Type "y" to continue: y
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: example_user
Enter new UNIX password: ********
Retype new UNIX password: ********
passwd: password updated successfully
Installation successful!
Documentation is available at:  https://aka.ms/wsldocs

Technical Principles and Architectural Background

The lxrun command operates based on the underlying architecture of WSL, directly calling Microsoft Store APIs to download the Ubuntu distribution's compressed package, then extracting and configuring it locally. This method avoids dependency on graphical interfaces, making it particularly useful when the Windows Store app malfunctions. Technically, the command handles core tasks such as filesystem initialization, user space configuration, and permission settings, ensuring seamless integration of the Linux environment with the Windows host.

It is important to note that lxrun, as a legacy tool, may be replaced by more modern installation methods (e.g., wsl --install) in newer WSL versions, but it remains a valid fallback in specific system versions or configurations. Users should ensure that WSL is enabled on their system before execution, typically by checking the "Windows Subsystem for Linux" option in the "Turn Windows features on or off" dialog.

Common Issues and Troubleshooting Recommendations

If the lxrun /install command fails, users can try the following troubleshooting steps: First, check if the system version supports WSL, ensuring Windows 10 is version 16215 or higher; second, verify network connectivity, as the download requires stable access to the Microsoft Store; and finally, run Command Prompt as an administrator to prevent installation interruptions due to insufficient permissions. Additionally, users should refer to official documentation (https://aka.ms/wsldocs) for the latest support and troubleshooting guides.

Through this analysis, users can not only resolve the "no installed distributions" error but also gain a deeper understanding of WSL installation mechanisms and the application of command-line tools, laying a solid foundation for future use of Linux environments.

Copyright Notice: All rights in this article are reserved by the operators of DevGex. Reasonable sharing and citation are welcome; any reproduction, excerpting, or re-publication without prior permission is prohibited.