Ubuntu下幾種常用到的國(guó)內(nèi)源

Ubuntu安裝后默認(rèn)的官方源是美國(guó)的服務(wù)器,但是美國(guó)服務(wù)器在國(guó)內(nèi)安裝軟件等會(huì)有較大的限制。所以我們需要將默認(rèn)的源切換為國(guó)內(nèi)源。一般來(lái)說(shuō),常用的國(guó)內(nèi)源有阿里源(這是中國(guó)官方源)、網(wǎng)易源和搜狐源等等。除此之外,還有高校源,比如清華、中科大以及浙大等等。如果是在校學(xué)生,那么換成自己學(xué)校內(nèi)部的源,更新和安裝軟件的速度會(huì)很快。如果是非校園網(wǎng)絡(luò),那么最推薦的就是阿里源。不同版本的Ubuntu系統(tǒng)的源列表不相同,在這里我只列舉Ubuntu 16.04系統(tǒng)的源列表。

1. 更換源的兩種方式

(1)打開(kāi)系統(tǒng)設(shè)置選擇,software&updates,如下:

image

然后在跳出來(lái)的框中點(diǎn)擊選擇”Download from:“選項(xiàng)

image

再點(diǎn)擊other選項(xiàng)會(huì)出現(xiàn)一個(gè)choose a download server框并選擇China,里面有很多國(guó)內(nèi)服務(wù)器可選擇。

image

(2)在sources.list文件中手動(dòng)更改源,即將對(duì)應(yīng)源列表中的代碼復(fù)制到sources.list文件中,過(guò)程如下:

<1> 打開(kāi)終端,通過(guò)cd指令進(jìn)入sources.list文件所在目錄。

$ cd /etc/apt

image

<2> 將原sources.list文件拷貝做備份,可以進(jìn)入/etc/apt目錄下看到有一個(gè)sources.list.bak文件。

$ sudo cp sources.list sources.list.bak

image

<3> 通過(guò)gedit指令對(duì)sources.list進(jìn)行編輯(也可以用vim指令),并將sources.list文件中的內(nèi)容全選刪除,再把對(duì)應(yīng)的源列表的內(nèi)容復(fù)制到文件中。

$ sudo gedit sources.list
或 執(zhí)行
$ sudo vi sources.list 進(jìn)入 sources.list后 按 ggdG 快捷vi操作刪除原文件內(nèi)容

image

<4>訪問(wèn)源列表里的網(wǎng)址,并讀取軟件列表,然后更新保存在本地電腦,換源結(jié)束。

$ sudo apt-get update

國(guó)內(nèi)的源地址

阿里云源

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

上海交通大學(xué)

deb http://ftp.sjtu.edu.cn/ubuntu/ dapper main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-updates main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ dapper main multiverse restricted universe

Ubuntu 10.04 臺(tái)灣更新源

deb http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ lucid-backports main multiverse restricted universe
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-backports universe main multiverse restricted

電子科技大學(xué)

deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

北京理工大學(xué)

deb http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

網(wǎng)易源

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

網(wǎng)易開(kāi)源鏡像站

阿里云源

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容