ubuntu使用官方的apt-get來安裝軟件,官方源的速度過慢。
但是使用阿里雲的源就不一樣了,也不會存在很多問題,下面爲筆者總結一下怎麼更換ubuntu的軟件源。
一,備份
#cd /etc/apt/
#sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
二,修改
#sudo vim /etc/sources.list
將sources.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