启用Win10的Linux子系统

Windows Subsystem for Linux

Introduce

Windows子系统Linux允许开发人员直接在Windows上运行GNU / Linux环境 – 包括大多数命令行工具,实用程序和应用程序。直接运行在Windows系统上,无需修改,无需虚拟机的开销。

Install on Windows 10

一. 环境配置

一般我们的windows是默认关闭支持Linux环境的,所以你要自己动手把它勾出来。

1> 打开“开发人员模式”
设置–更新和安全–针对开发人员–选中“开发人员模式”。
2> 启用“适用于Linux的Windows子系统(Beta)”
控制面板–程序–启用或关闭Windows功能–勾选“适用于Linux的Windows子系统(Beta)”,点击确定等待开启成功,然后重启电脑。

二. 安装Ubuntu
在应用商城中搜索Linux,点击进入【获取这些应用】

《启用Win10的Linux子系统》

下载完毕后,打开让其进行安装,随后设置用户名及密码。至此Linux子系统安装完毕。

三. 修改Ubuntu的aptget源为阿里源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak # 备份
sudo vim /etc/apt/sources.list # 修改

修改内容如下:


deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
sudo apt-get update #更新列表

Reference

Windows 10 Installation Guide

    原文作者:花卷
    原文地址: https://segmentfault.com/a/1190000016354632
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞