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碎连,如下:
然后在跳出來(lái)的框中點(diǎn)擊選擇”Download from:“選項(xiàng)
再點(diǎn)擊other選項(xiàng)會(huì)出現(xiàn)一個(gè)choose a download server框并選擇China灰羽,里面有很多國(guó)內(nèi)服務(wù)器可選擇。
(2)在sources.list文件中手動(dòng)更改源鱼辙,即將對(duì)應(yīng)源列表中的代碼復(fù)制到sources.list文件中廉嚼,過(guò)程如下:
<1> 打開(kāi)終端,通過(guò)cd指令進(jìn)入sources.list文件所在目錄倒戏。
$ cd /etc/apt
<2> 將原sources.list文件拷貝做備份怠噪,可以進(jìn)入/etc/apt目錄下看到有一個(gè)sources.list.bak文件。
$ sudo cp sources.list sources.list.bak
<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)容
<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)源鏡像站
-
提供 FreeBSD阳仔,OpenBSD忧陪,archlinux,centos驳概,cygwin赤嚼,debian,F(xiàn)edora顺又,gentoo更卒,kernel,openSUSE稚照,slackware蹂空,Ubuntu
deb http://Ubuntu.cn99.com/ubuntu/ lucid main universe restricted multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ lucid main universe restricted multiverse
deb http://Ubuntu.cn99.com/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://Ubuntu.cn99.com/ubuntu/ lucid-security universe main multiverse restricted
deb http://Ubuntu.cn99.com/ubuntu/ lucid-updates universe main multiverse restricted
deb http://Ubuntu.cn99.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb-src http://Ubuntu.cn99.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://Ubuntu.cn99.com/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://Ubuntu.cn99.com/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://Ubuntu.cn99.com/ubuntu/ lucid-updates universe main multiverse restricted
阿里云源
# 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