ubuntu 20.04更换国内源

一、备份源列表

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

二、命令行打开sources.list文件

       sudo vim /etc/apt/sources.list

三、修改sources.list文件

       sudo vim /etc/apt/sources.list

       将源文件内容全部注释,并添加以下内容任意源

        

复制代码
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
阿里云源
复制代码
复制代码
 1 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted
 2 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted
 3 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal universe
 4 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates universe
 5 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal multiverse
 6 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates multiverse
 7 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
 8 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted
 9 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security universe
10 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security multiverse
清华源【推荐-更新快】
复制代码

四、保存:ESC+:wq!

五、更新源

       sudo apt-get update

六、更新软件,然后你就可以感受到更换国内源之后的飞速提升了

       sudo apt-get dist-upgrade

       sudo apt-get upgrade

posted on   木乃伊人  阅读(824)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
历史上的今天:
2021-04-06 Windows下安装 RabbitMQ
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示