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