前言
本文將基於 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回車即可~