尝试在Windows上使用bash,但收到未安装发行版的消息 [英] Trying to use bash on Windows and got no installed distributions message

查看:0
本文介绍了尝试在Windows上使用bash,但收到未安装发行版的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Windows Subsystem for Linux未安装任何分发版本。 可以通过访问Windows应用商店来安装发行版: https://aka.ms/wslstore按任意键继续...

当我转到打开Windows应用商店应用程序的URL时,那里没有任何Linux分发的迹象。

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

Windows 10 Enterprise Insider预览。评估副本。生成 16215.ars_prerelease.170603-1840

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

有帮助吗?

推荐答案

当Windows应用商店打开时,没有区域可供选择,于是我找到了此命令lxrun /install,并且也适用于我。

您将得到类似以下内容的输出:

C:WINDOWSsystem32>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

这篇关于尝试在Windows上使用bash,但收到未安装发行版的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆