I. Check system version and the kernel
First check your ubuntu codename system, this step is very important, it led directly to the source if you update your system from the effects of view by:
. 1 lsb_release - A 2 such as, my system displays: . 3 No the LSB modules are Available. . 4 Distributor ID: the Ubuntu . 5 the Description: the Ubuntu 14.04 . 2 the LTS . 6 Release: 14.04 . 7 Codename: Trusty . 8 . 9 shows some ubuntu version information, require that Codename, for example, I have here a trusty
II. Support source confirmed that Ali
Landing page at: http://mirrors.aliyun.com/ubuntu/dists/
The page shows the various versions of Codename Ali cloud support under the ubuntu system, to ensure that their presence Codename (usually some) in the web page
III. Source backup system
1 cd /etc/apt 2 sudo mv sources.list sources.list_bak
IV. Adding a new source file
1 sudo we sources.list
And add the following: Note, trusty each line should get to see the first step instead of Codename
deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
Bloggers Teletubbies is 6 xenial, so use are:
deb http: // mirrors.aliyun.com/ubuntu/ great main restricted universe multiverse deb http: // mirrors.aliyun.com/ubuntu/ great-security main restricted universe multiverse deb http: // mirrors.aliyun.com/ubuntu / great-updates main restricted universe multiverse deb http: // mirrors.aliyun.com/ubuntu/ great-proposed main restricted universe multiverse deb http: // mirrors.aliyun.com/ubuntu/ great-backports main restricted universe multiverse deb src http: // mirrors.aliyun.com/ubuntu/ great main restricted universe multiverse deb-src http: //mirrors.aliyun.com/ubuntu/ great-security main restricted universe multiverse deb-src http: // mirrors.aliyun.com/ubuntu/ great-updates main restricted universe multiverse deb-src http: // mirrors.aliyun.com/ ubuntu / great-proposed main restricted universe multiverse deb-src http: // mirrors.aliyun.com/ubuntu/ great-backports main restricted universe multiverse
Into VI, by i, and then copy the line of source code, then the Right Terminal Paste, and then press the Esc, Enter, and then repeat the previous operations until the last row have been copied, the press the Esc, Enter: Enter save wq and exit vi.
V. Preservation and update
sudo apt-get update
VI. The following provides configuration script
Codename=$( (lsb_release -a)|awk '{print $2}'|tail -n 1 ) echo "\ deb http://mirrors.aliyun.com/ubuntu/ $Codename main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-backports main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-proposed main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-security main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-updates main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-backports main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-proposed main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-security main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-updates main multiverse restricted universe ">sources.list apt-get update
VII. Domestic mirroring method of obtaining content
Enter the official website, found in the list on the left Ubuntu, click on the question mark to the right of Ubuntu or help
Help documentation for information:
1 System Version Number Name 2 the Ubuntu 16.04 xenial . 3 the Ubuntu 15.10 Willy . 4 the Ubuntu 14.04 Trusty . 5 the Ubuntu 12.04 Precise . 6 main, Restricted, Universe, Multiverse difference (DOF software) . 7 . 8 name of freedom . 9 main entirely free software 10 Restricted not completely free software 11 Universe official Ubuntu does not provide support and patches, thanks to community support 12 muitiverse non-free software, do not provide support and patch 13 a source, the role of the following directories (pure personal guess) 14 15 name the role of 16 dists the main source storage 17 ground source storage pools security, backports, etc. 18 a certified official source project
Domestic faster source URL:
Tsinghua TUNA mirror source: https://mirrors.tuna.tsinghua.edu.cn/
USTC USTC mirroring: https://mirrors.ustc.edu.cn/
163 Source: http://mirrors.163.com/ (full name Netease open mirror sites, formerly cn99 source)
Sohu source, which is the official source of ubuntu source in China: http://mirrors.sohu.com/
Beijing Jiaotong University source: http://mirror.bjtu.edu.cn / cn /
VIII. Ubuntu source list (Tsinghua University, Ali, an official, you can choose one)
Ubuntu in the source list in /etc/apt/sources.list, can be replaced
Tsinghua source
deb http: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ great main restricted universe multiverse deb http: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ great-backports main restricted universe multiverse deb http: / / mirrors.tuna.tsinghua.edu.cn/ubuntu/ great-proposed main restricted universe multiverse deb http: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ great-security main restricted universe multiverse deb http: // mirrors .tuna.tsinghua.edu.cn / ubuntu / great-updates main restricted universe multiverse deb-src http: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ great main restricted universe multiverse deb-src http:// mirrors.tuna.tsinghua.edu.cn/ubuntu/ great-backports main restricted universe multiverse deb-src http: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ great-proposed main restricted universe multiverse deb-src http: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ great-security main restricted universe multiverse deb-src http: // mirrors.tuna.tsinghua.edu.cn/ubuntu/ great-updates main multiverse restricted universe
Ali source
deb http: // mirrors.aliyun.com/ubuntu/ great main restricted universe multiverse deb http: // mirrors.aliyun.com/ubuntu/ great-security main restricted universe multiverse deb http: // mirrors.aliyun.com/ubuntu / great-updates main restricted universe multiverse deb http: // mirrors.aliyun.com/ubuntu/ great-proposed main restricted universe multiverse deb http: // mirrors.aliyun.com/ubuntu/ great-backports main restricted universe multiverse deb src http: // mirrors.aliyun.com/ubuntu/ great main restricted universe multiverse deb-src http: //mirrors.aliyun.com/ubuntu/ great-security main restricted universe multiverse deb-src http: // mirrors.aliyun.com/ubuntu/ great-updates main restricted universe multiverse deb-src http: // mirrors.aliyun.com/ ubuntu / great-proposed main restricted universe multiverse deb-src http: // mirrors.aliyun.com/ubuntu/ great-backports main restricted universe multiverse
The official source
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu xenial partner # deb-src http://archive.canonical.com/ubuntu great partner deb http: // security.ubuntu.com/ubuntu great-security main restricted # deb-src http: // security.ubuntu.com/ubuntu great-security main restricted deb http: / / security.ubuntu.com/ubuntu great-security universe # deb-src http: // security.ubuntu.com/ubuntu great-security universe deb http: // security.ubuntu.com/ubuntu great-security multiverse # deb src http: // security.ubuntu.com/ubuntu great-security multiverse deb http: // cn.archive.ubuntu.com/ubuntu/ great-proposed main restricted universe multiverse
Articles from https://www.bowu8.com/archives/235/ and https://www.cnblogs.com/itech/archive/2009/04/17/1438439.html
In this table, thanks!