1. 程式人生 > >ubuntu16.04更換阿裏雲軟件源

ubuntu16.04更換阿裏雲軟件源

sed b-s get mirrors ubuntu cte mirror b- security

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

ubuntu16.04更換阿裏雲軟件源