Ubuntu18.04换阿里镜像源

Ubuntu18.04换阿里镜像源

  • 蓝默空间-BluishZone
    • 首先查看主机系统版本号
    • 备份系统自带的镜像源
    • 编辑配置文件
    • 感受畅快如飞的网速吧~

蓝默空间-BluishZone

你好! "蓝默空间"的欢迎页。如果你想学习交流PHP和Linux系统运维, 可以仔细阅读这篇文章,然后关注文章底部公众号获取更多知识。

首先查看主机系统版本号

root@ubuntu-server:~# cat /etc/issue
Ubuntu 18.04.2 LTS \n \l

备份系统自带的镜像源

root@ubuntu-server:~# root@ubuntu-server:~# cp /etc/apt/sources.list /etc/apt/sources.list.bak

编辑配置文件

行首:d+G全部删除
i插入 shift+insert粘贴如下内容:

########   Ubuntu18.04 阿里云镜像源   ###############
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb 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 main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
########   阿里云镜像源 END  ###############

感受畅快如飞的网速吧~

root@ubuntu-server:~# apt-get update
Fetched 15.5 MB in 8s (1,871 kB/s)                                                     
Reading package lists... Done

公众号: LAMPer 技术栈;
QQ群: 670494430 ,来和蓝默和他的小伙伴们一起扯犊子吧!!!

你可能感兴趣的:(Ubuntu18.04换阿里镜像源)