1. 程式人生 > >Ubuntu 更換阿里雲軟體源

Ubuntu 更換阿里雲軟體源

使用Ubuntu 的apt-get來安裝軟體是總是因為官方源的速度太慢而抓狂。
但是用阿里雲的源就很快,下面總結一下如何更換Ubuntu的軟體源。

一、備份

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 

二、修改

sudo vim /etc/apt/sources.list

將source.list檔案內容替換成下面的

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com
/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun
.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.aliyun
.com/ubuntu/ trusty-backports main restricted universe multiverse

三、更新

sudo apt-get update