经常使用Ubuntu的同学都会遇到软件安装下载速度慢的情况,究其原因,是因为Ubuntu默认源的地址都在国外所导致,其实国内也有很多优秀的源,比如阿里源、中科大源、清华源、163源等,只需要简单的更换一下源,下载度立刻就上来了。
以下操作都必须在管理员模式下(使用su命令进入)进行,否则会执行失败
备份官方源
mv /etc/apt/sources.list /etc/apt/sources.list.bk
下载第三方源文件更换
具体使用哪一个,可以自行测试按照效果选用
#163源
wget 'https://gitee.com/zaozuotime/ubuntu-update-source-file/raw/master/163.sources.list' -O /etc/apt/sources.list
#阿里源
wget 'https://gitee.com/zaozuotime/ubuntu-update-source-file/raw/master/aliyun.sources.list' -O /etc/apt/sources.list
#清华源
wget 'https://gitee.com/zaozuotime/ubuntu-update-source-file/raw/master/tsinghua.sources.list' -O /etc/apt/sources.list
#中科大源
wget 'https://gitee.com/zaozuotime/ubuntu-update-source-file/raw/master/ustc.sources.list' -O /etc/apt/sources.list
更新资源
apt-get update