Linux Ubuntu 修改 /etc/apt/sources.list (鏡像源)文件(非常實用)
https://blog.csdn.net/weixin_47156401/article/details/121093769
修改 /etc/apt/sources.list 文件,也即修改鏡像源,能夠加快在 Ubuntu 中下載和更新相關軟件數據;否則默認情況下使用的是外網,下載起來比較慢!!!
基本步驟:
1、復制一份 /etc/apt/sources.list 文件,以作備用,其中 sources-bak.list 是備份文件名;
sudo cp /etc/apt/sources.list /etc/apt/sources-bak.list
2、打開 /etc/apt/sources.list 文件;
sudo vi /etc/apt/sources.list
3、點擊 D 刪除里面的所有內容;
4、打開鏡像源 阿里雲鏡像源鏈接 ;
5、找到 Ubuntu 對應版本的鏡像;
-
deb http:
//mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
-
deb-src http:
//mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
-
-
deb http:
//mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
-
deb-src http:
//mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
-
-
deb http:
//mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
-
deb-src http:
//mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
-
-
deb http:
//mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
-
deb-src http:
//mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
-
-
deb http:
//mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
-
deb-src http:
//mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse