如何在 Windows 10 开发者预览版中启用 Bash?

How to enable Bash in Windows 10 developer preview?

我正在使用 windows 10 开发者预览版 Build 14295。从 Build 会议上我了解到我们可以在 windows 10 中启用 bash。但不清楚如何启用 bash 在 windows 10.

请在 post 下方找到 运行ning bash 在 windows 10 中的博客 post。 Link : http://www.hanselman.com/blog/DevelopersCanRunBashShellAndUsermodeUbuntuLinuxBinariesOnWindows10.aspx

After turning on Developer Mode in Windows Settings and adding the Feature, run you bash and are prompted to get Ubuntu on Windows from Canonical via the Windows Store

我启用了开发者模式。但我不确定如何添加功能和 运行 bash。请帮忙。

Bash 功能在 build 14295 上不可用。

  • Scott 回答了内部人员即将推出更新的问题(Microsoft 希望在将此功能推送给内部人员之前确保一切正常)
  • 我一直在与 Microsoft 项目经理 (Sarah Cooley) 聊天,她确认她在 Build 14311 上具有 Bash 功能(内部人员尚未公开)

您可以在此处查看 Scott 的回答:https://news.ycombinator.com/item?id=11394994

今天在 Build 14316 上可用! 公告在https://blogs.windows.com/windowsexperience/2016/04/06/announcing-windows-10-insider-preview-build-14316/

要在 Windows10 中启用 bash:

  1. 依次单击“开始”按钮、“控制面板”、“程序”,然后单击“打开或关闭 Windows 功能”。
  2. 为 Linux
  3. 启用 Windows 子系统
  4. 要安装 Bash,请打开命令提示符并键入“bash”

欲了解更多信息,请访问:

  1. Announcing Windows 10 Insider Preview Build 14316
  2. Run Bash on Ubuntu on Windows

在某些情况下,尝试打开开发者模式可能会使“设置”应用程序崩溃。如果发生这种情况,解决方法是使用此处的这些步骤 enable Developer Mode

第 1 步:启用开发者模式(设置 - 更新和安全 > 对于开发者)

第 2 步:搜索“Windows 功能”并选择“打开或关闭 Windows 功能”并为 Linux(测试版)启用 Windows 子系统。

第 3 步:要安装 Bash,请打开命令提示符并键入“bash”

第 4 步:Bash 将在 windows 上安装所需的软件包,您可以从 windows bash

开始

第 5 步:通过 apt-get install 安装任何包 package_name

Bash 在 windows 上编程愉快!

现在,您不必再启用开发者模式,运行 bash。无需开发人员即可为您提供更好的安全性。模式已启用。

将 git bash 到 运行 bash 命令下载到 windows 文件系统

git-bash website