导读 | 安装Ubuntu 18.04后,使用国外源太慢了,修改为国内源会快很多。本文教你如何修改阿里源为Ubuntu 18.04默认的源。 |
备份/etc/apt/sources.list
#备份 cp /etc/apt/sources.list /etc/apt/sources.list.bak
在/etc/apt/sources.list文件前面添加如下条目
#添加阿里源 deb //mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb //mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb //mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb //mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb //mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src //mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src //mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src //mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src //mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src //mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
最后执行如下更新源
##更新 sudo apt-get update sudo apt-get upgrade
另外其他几个国内源如下:
中科大源
##中科大源 deb //mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb-src //mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb //mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb-src //mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb //mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb-src //mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb //mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb-src //mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb //mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse deb-src //mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
163源
##163源 deb //mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb //mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb //mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb //mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb //mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src //mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb-src //mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb-src //mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src //mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src //mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
清华源
##清华源 deb //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb-src //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb-src //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb-src //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb-src //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse deb-src //mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
原文来自:
本文地址://lrxjmw.cn/ubuntu-18-04-ali.html编辑:public,审核员:逄增宝
Linux大全:
Linux系统大全: