Monday, June 08, 2020

Windows Subsystem for Linux has no installed distributions

When trying to launch a new bash console on Windows 10, I get this error


wslbridge error: failed to start backend process
note: bash.exe output: Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore


ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...



Windows Subsystem for Linux

This seems weird, as bash worked on my system before, and I remembered installing WSL. A quick check using "optionalfeatures" show that WSL is indeed installed


Installing WSL does not mean it comes with a Linux distribution. I still need to install it manually.


Note also that I am using an older version of Windows 10. Windows 10 Version 1803 and above should be using the wsl command.


Install Linux

Use the lxrun command to install a Linux distribution


λ lxrun /install /y
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

Downloading from the Microsoft Store... 100%
Extracting filesystem, this will take a few minutes...
Installation successful!
Documentation is available at:  https://aka.ms/wsldocs





After successfully installing Ubuntu, bash works once more


root@hostname:/mnt/c/Users/hanxue#






No comments:

Post a Comment