尝试在 Windows 上使用 bash 并没有收到已安装的发行版消息

新手上路,请多包涵

我正在尝试在 Windows 10 上使用 bash ,但在尝试运行 bash 时收到此消息:

适用于 Linux 的 Windows 子系统未安装任何发行版。可以通过访问 Windows 应用商店安装发行版: https ://aka.ms/wslstore 按任意键继续…

当我转到打开 Windows Store 应用程序的那个 url 时,那里没有任何 Linux 发行版的迹象。

我的 Windows 版本是(如屏幕右下角):

Windows 10 企业内幕预览。评估副本.Build 16215.rs_prerelease.170603-1840

我按照本指南 安装指南 中的说明进行操作,并且正在观看 Scott Hanselman 的视频 Editing code and files on Windows Subsystem for Linux on Windows 10 ,但他们没有收到未安装发行版的消息。

有什么帮助吗?

原文由 ddieppa 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 749
2 个回答

当 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

原文由 Lucas Dias 发布,翻译遵循 CC BY-SA 4.0 许可协议

尝试卸载并重新安装后,我遇到了类似的错误。

对我来说,我必须以管理员身份打开一个 cmd 提示符并运行 lxrun /install

原文由 Levi 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题