Trying to use bash on Windows and got no installed distributions message

ddieppa picture ddieppa · Jun 29, 2017 · Viewed 89.3k times · Source

I am trying to use bash on Windows 10, but I'm getting this message when tried to run bash:

Windows Subsystem for Linux has no installed distributions. Distributions can be installed by visiting the Windows Store: https://aka.ms/wslstore Press any key to continue...

When I go to that url which opens the Windows Store app, there no sign of any Linux distribution there.

My windows version is(as in my right bottom corner of the screen):

Windows 10 Enterprise Insider Preview. Evaluation copy.Build 16215.rs_prerelease.170603-1840

I follow the instructions in this guide Installation Guide and also was watching this video Editing code and files on Windows Subsystem for Linux on Windows 10 from Scott Hanselman, but they didn't get the message of no installed distribution.

Any Help?

Answer

Lucas Dias picture Lucas Dias · Jul 2, 2017

When the Windows Store opened, there was no Distro to choose, then I found this command lxrun /install and worked for me as well.

You will get something like this as an output:

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: <you type your login here>
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Installation successful!
Documentation is available at:  https://aka.ms/wsldocs