Ubuntu 配置阿里云Apt镜像源

2018-12-13  本文已影响0人  一杉风雨

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

  1. 创建文件
/etc/apt/sources.list.d/aliyun.list
  1. 修改内容
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
  1. 更新
apt-get update
上一篇 下一篇

猜你喜欢

热点阅读