WSL 配置 ubuntu 软件源


#Windows


对于 ubuntu 20.04 ,按照如下步骤配置。

1、备份配置文件

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

2、修改配置文件 将 /etc/apt/sources.list 内容修改为:

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
deb http://mirrors.aliyun.com/ubuntu/ focal multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-security universe
deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse

3、更新源

sudo apt update
sudo apt upgrade


( 本文完 )