在百度搜索–>ubuntu鏡像站–>選擇清華的鏡像源–>進去選擇ubuntu—>選擇ubuntu的版本(這里以16.04的為例)–>復制里面的內容:(內容如下,不過一直在更新,我們可以安裝上面的步驟去搜索即可)
1.先備份系統的/etc/apt/sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.back
2.打開文件,替換里面的內容,就 OK了
gedit /etc/apt/sources.list
例如阿里源:
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
