DeepOps的ubuntu小笔记-ubuntu20.04lts更换阿里云的源

首先备份本地的源

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

编辑源文件

vi /etc/apt/sources.list

删除原有内容,添加下面内容

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
deb http://mirrors.aliyun.com/ubuntu/ focal multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-security universe
deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse

更新源

sudo apt-get update
sudo apt-get upgrade

Leave a Reply

Your email address will not be published.