ubuntu 20.04 更换国内的源

不得不说,十来年过去,ubuntu在国内不更新国内的源,简直没法用。

要安装以下gimp,krita直接被墙了。

国内这些年墙的越来越厉害,天知道那些losers在害怕什么。

还是换一下源吧。


打开控制台

然后

cd /etc/apt

然后backup一下默认的源文件sources.list 为 backupsources.list ,作为文件的backup,以备在需要的时候恢复。

sudo cp -r sources.list backupsources.list

然后编辑sources.list

sudo vi 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

到文件中,然后执行。

sudo apt update 
sudo apt upgrade

然后就ok了。

参考资料:

https://www.cnblogs.com/leeyazhou/p/12976814.html

https://blog.csdn.net/xiangxianghehe/article/details/105688062

https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

https://www.cnblogs.com/fanbi/p/10423080.html

发表评论

邮箱地址不会被公开。 必填项已用*标注