系统极客一直在努力
专注操作系统及软件使用技能

如何启用Bash on ubuntu on Windows

Bash on ubuntu on Windows

近日微软在 Build 2016 大会上宣布将 Bash Shell 带到 Windows 10 当中进行原生集成,并进行了相关效果演示。消息一经发布,不仅在 Windows 社区,更是在 Linux 社区引起了轰动。系统极客之前也曾对 Ubuntu on Windows 10 工作原理进行过分析,现在我们来说说具体的 Bash on ubuntu on Windows「玩耍」方式。

注意:Bash on Ubuntu on Windows(就是此前曾介绍过的 WSL 层)只能运行在 64 位版本的 Windows 10 中。

Windows Insider

由于目前 Bash on Ubuntu on Windows 还只处于测试阶段,你需要使用加入了 Windows Insider 计划的 Microsoft Account 登录将系统更新到 Windows 10 Build 14316 才能使用。如果只是在虚拟机中进行试用或是要直接重装升级到新版本的用户,可以下载本站提供的 Windows 10 Redstone 1 (RS1) Build 14316 光盘镜像

开启开发人员模式

无论你是通过全新安装还是 Windows Update 升级到最新 Windows 10 (至少 Build 14316 )后,需要先在「设置」-「安全和更新」-「针对开发人员」选项卡中启用「开发人员模式」。

开发人员模式

该功能开启后 Windows 10 PC 将开始使用最新的开发版功能。

开启Bash for Windows

现在所有先决条件都已准备就绪,准备开始实际安装 Windows subsystem for Linux。不过在安装之前,建议大家先对操作系统进行 Windows Update,看下是否有适用的更新安装。

打开「控制面板」-「卸载程序」-点击左侧的「启用或关闭 Windows 功能」- 在弹出的窗口中勾选「Windows subsystem for Linux(Beta)」组件进行安装。

Windows subsystem for Linux(Beta)

如果想偷懒的话,可以直接在 PowerShell 中执行如下命令启用 Windows subsystem for Linux 功能:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Microsoft-Windows-Subsystem-Linux

不论采用何种方式启用此功能,都需要重启系统之后才能生效。

使用Bash on ubuntu on Windows

首次启用 Bash on ubuntu on Windows 之后它会自动提示要下载安装 Ubuntu on Windows,只需敲 y 同意便会自动从 Windows Store 中下载安装。具体的 License 许可信息可以查看命令提示的 http://aka.ms/uowterms 链接。

Bash on ubuntu on Windows

下载安装完成后,我就可以直接执行 Linux Shell 命令、安装程序等你能想到的几乎所有事情。

赞(0) 赞赏

评论 3

  1. #3

    Ubuntu CoreUbuntu Core是一个专为云平台和智能设备打造的全新ubuntu,并具有事务性的更新功能。Ubuntu Core 是以事务性更新对 Ubuntu 进行的一次全新演绎——极小的服务器映像,采用与当今 Ubuntu 相同的库,但提供应用程序的机制却更加简单。snappy 方式更快、更可靠,让我们能为应用程序和用户提供更强大的安全保障,而这正是我们称其为“snappy”应用程序的原因所在。snappy 应用程序和 Ubuntu Core 本身可以在原子层面升级,并可根据需要回滚。这是一种坚如磐石的方式,对于将可预测性和可靠性放在首位的部署来说,是理想的选择。它被称为“事务性”或“基于映像的”系统管理。我们很高兴让每个 Ubuntu 认证的云都能使用它。

    xgqfrms8年前 (2016-09-10)回复
  2. #2

    https://developer.ubuntu.com/en/snappy/start/Download the KVM images (x86):15.04/stableTry Ubuntu Core on a virtual environment locally with KVM. Alternatively try our Vagrant images.154MB

    xgqfrms8年前 (2016-09-10)回复
  3. #1

    话说,下载安装 Ubuntu on Windows的系统大小如何,会不会很大呀?还只是,一个kernel+shell 呢?

    xgqfrms8年前 (2016-09-10)回复

微信赞赏