win10下安装WSL(ubuntu 18.04LTS)

原文链接: https://www.jianshu.com/p/3e627ff45ccb

1、打开win下的 :  启动或关闭windows功能,选中适用于linux的windows子系统,之后重启

win10下安装WSL(ubuntu 18.04LTS)_第1张图片

2、打开 微软应用商店,搜linux,选ubuntu18.04LTS,之后获取,安装完成后打开

win10下安装WSL(ubuntu 18.04LTS)_第2张图片

win10下安装WSL(ubuntu 18.04LTS)_第3张图片

3、换源

先备份原来的

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

查看自己ubuntu的版本,Ubuntu 18.04 LTS 的代号是 :bionic,之后编辑文件

lsb_release -c

sudo vim /etc/apt/sources.list

之后将原来的源替换为以下:

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

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

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

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

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

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

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

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

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

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

:wq保存后更新一下:

sudo apt-get update
sudo apt-get upgrade

如果想要配置更多可以参考以下链接:

https://www.jianshu.com/p/3e627ff45ccb

你可能感兴趣的:(系统)