我尝试在 Windows 10 上使用 bash,但在尝试运行 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...
当我转到打开 Windows 应用商店 应用程序的那个 URL 时,那里没有任何 Linux 分发的迹象。
我的 windows 版本是(在屏幕的右下角):
Windows 10 Enterprise Insider Preview. Evaluation copy.Build 16215.rs_prerelease.170603-1840
我按照本指南中的说明进行操作 Installation Guide并且还在看这个视频Editing code and files on Windows Subsystem for Linux on Windows 10来自 Scott Hanselman,但他们没有收到未安装发行版的消息。
有什么帮助吗?
最佳答案
当 Windows 应用商店打开时,没有 Distro 可供选择,然后我找到了这个命令 lxrun/install
并为我工作。
你会得到这样的输出:
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
https://stackoverflow.com/questions/44829878/