Ubuntu 18 配置阿里云Apt镜像源

国外的Apt源速度过慢,这里记录下如何将Ubuntu默认Apt源为阿里镜像源。

创建source.list文件

sudo -i ; touch /etc/apt/sources.list.d/aliyun.list

设置修改内容

echo ' deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse  deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse  ' > /etc/apt/sources.list.d/aliyun.list

更新源

apt-get update

Link to this article: https://www.jeeam.com/ubuntu-18-peizhialiyunaptjingxiangyuan.html

Leave a Reply

Your email address will not be published. Required fields are marked *