前言
本文将基于 Windows10专业版 安装 Ubuntu子系统
1、控制面板 -> 程序 -> 选择启用或关闭Windows功能 -> 勾上 适用Linux的Windwos子系统 -> 确定 -> 重启电脑
2、在 设置 -> 更新和安全 -> 开发者选项 中切换到开发人员模式
3、打开windows商店,搜索 ubuntu,安装ubuntu
ubuntu下载地址: https://docs.microsoft.com/en-us/windows/wsl/install-manual#downloading-distros
下载完之后双击运行安装即可~
4、启动
等待安装
然后设置用户名密码
若需修改密码,执行 sudo passwd
5、设置国内阿里镜像数据源
# 1.切换为超级管理员root
sudo su
# 2.编辑数据源配置文件
vim /etc/apt/sources.list
# 3. i 插入以下内容
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
# 4. Esc -> :wq 保存退出
# 5.更新配置
apt-get update
6、如何进入ubuntu子系统 ?
输入ubuntu回车即可~
閱讀更多 鄭清 的文章