ubuntu更換清華軟件源

打开软件源的编辑sudo gedit /etc/apt/sources.list

软件源: Ubuntu--更改国内镜像源(阿里、网易、清华、中科大)

打開軟件源文件進行修改:

使用

sudo vim /etc/apt/sources.list

如果无法编辑。 使用

sudo gedit /etc/apt/sources.list

 

将原文件中镜像地址全部更改为以下一个地址(清華大學開源鏡像站):

#默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

 

更换好源之后执行下方命令更新: sudo apt-get update sudo apt-get upgrade

posted @ 2021-11-18 09:57  仓颉cahr  阅读(63)  评论(0编辑  收藏  举报