Bash on ubuntu-01

近日微软在 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 )后,需要先在「设置」-「安全和更新」-「针对开发人员」选项卡中启用「开发人员模式」。

Bash-on-ubuntu-02

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

开启Bash for Windows

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

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

Bash-on-ubuntu-03

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

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

Bash on ubuntu-04

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

使用Bash on ubuntu on Windows

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

Bash on ubuntu -05

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

原文来自:http://www.sysgeek.cn/enable-bash-on-ubuntu-on-windows/原作者:系统极客

本文地址:https://www.linuxprobe.com/bash-on-ubuntu-on-windows.html

本文原创地址:https://www.linuxprobe.com/bash-on-ubuntu-on-windows.html编辑:public,审核员:暂无