备份
Linux的源地址可以在/etc/apt/source.list中进行配置
首先在配置之前需要备份配置(cp source.list source.list.bak),以防操作失误造成数据的损失
在Linux中配置绝大部分文件需要root权限,应在命令前加sudo,即
sudo cp source.list source.list.bak
修改源
lsb_release -a命令了解自己的版本代号,百度搜索相关关键字
我使用的是vim,将修改源改为阿里云的源
阿里源地址:
deb Index of /ubuntu/ focal main restricted universe multiverse deb-src Index of /ubuntu/ focal main restricted universe multiverse deb Index of /ubuntu/ focal-security main restricted universe multiverse deb-src Index of /ubuntu/ focal-security main restricted universe multiverse deb Index of /ubuntu/ focal-updates main restricted universe multiverse deb-src Index of /ubuntu/ focal-updates main restricted universe multiverse deb Index of /ubuntu/ focal-proposed main restricted universe multiverse deb-src Index of /ubuntu/ focal-proposed main restricted universe multiverse deb Index of /ubuntu/ focal-backports main restricted unive