Ubuntu 12.04 Update Source

Source: Internet
Author: User
Tags aliyun

Ubuntu source is used to Apt-get install based on the URL in the source to find the corresponding software (guess), so the configuration of the source determines the speed at which you update the software, and even can find the corresponding command (I was in the installation of a command found 404 when I remember to update).
The current system source information is saved in the/etc/apt/sources.list file, the current system source is as follows (this should be used by Ubuntu 12 by default):
[email protected]:~/workplace/tbnet/trunk/tbsys$ grep-v "^#"/etc/apt/sources.list | Grep-v "^$" Deb Http://cn.archive.ubuntu.com/ubuntu/precise main restricteddeb-src http://cn.archive.ubuntu.com/ Ubuntu/precise main Restricteddeb http://cn.archive.ubuntu.com/ubuntu/precise-updates main RESTRICTEDDEB-SRC/http Cn.archive.ubuntu.com/ubuntu/precise-updates Main Restricteddeb Http://cn.archive.ubuntu.com/ubuntu/precise UNIVERSEDEB-SRC http://cn.archive.ubuntu.com/ubuntu/precise Universedeb http://cn.archive.ubuntu.com/ubuntu/ Precise-updates universedeb-src http://cn.archive.ubuntu.com/ubuntu/precise-updates universedeb/http Cn.archive.ubuntu.com/ubuntu/precise multiversedeb-src http://cn.archive.ubuntu.com/ubuntu/precise Multiversedeb Http://cn.archive.ubuntu.com/ubuntu/precise-updates multiversedeb-src http://cn.archive.ubuntu.com/ubuntu/ Precise-updates multiversedeb http://cn.archive.ubuntu.com/ubuntu/precise-backports main restricted universe MULTIVERSEDEB-SRC httP://cn.archive.ubuntu.com/ubuntu/precise-backports main restricted Universe Multiversedeb/HTTP Security.ubuntu.com/ubuntu precise-security main RESTRICTEDDEB-SRC Http://security.ubuntu.com/ubuntu Precise-security main restricteddeb http://security.ubuntu.com/ubuntu precise-security universedeb-src/http Security.ubuntu.com/ubuntu precise-security universedeb Http://security.ubuntu.com/ubuntu precise-security MULTIVERSEDEB-SRC Http://security.ubuntu.com/ubuntu precise-security Multiverse



Learn grep new usage: ^ to match the start of a row,-V to indicate a row that does not contain the specified string as a condition, and $ to match the end of a line
Now try Ali's source
deb/HTTP/ Mirrors.aliyun.com/ubuntu/utopic main restricted universe Multiversedeb http://mirrors.aliyun.com/ubuntu/ Utopic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/utopic-updates main Restricted Universe multiversedeb http://mirrors.aliyun.com/ubuntu/utopic-proposed main restricted universe Multiversedeb http://mirrors.aliyun.com/ubuntu/utopic-backports main restricted universe MULTIVERSEDEB-SRC/HTTP Mirrors.aliyun.com/ubuntu/utopic main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ Utopic-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/utopic-updates main Restricted Universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/utopic-proposed main restricted universe MULTIVERSEDEB-SRC http://mirrors.aliyun.com/ubuntu/utopic-backports main restricted universe multiverse 



New command: sudo sed-i ' s/^/#&/g '/etc/apt/sources.list This command can be added to the beginning of each line of the specified file #, which can now be replaced with any content. After commenting on all the source information, you can add a new source, but here's a bit of a try. What happens if there is no information stored in this file?
Execute the sudo apt-get Update command to update the source before attempting to install a software. The following error appears: [Email protected]:~/workplace/tbnet/trunk/tbsys$ sudo apt-get install make
Reading Package Lists ... Done
Building Dependency Tree
Reading state information ... Done
The package has not been available, but was referred to by the another package.
This may mean and the package are missing, has been obsoleted, or
is only available from another source

E:package ' make ' have no installation candidate
Haha, sure enough this source for Apt-get is very important, now try to use the source of Ali, update speed is very fast. get:110 http://mirrors.aliyun.com utopic-backports/restricted translation-en [B]
get:111 http://mirrors.aliyun.com utopic-backports/universe translation-en [6,694 B]
Fetched 30.1 MB in 1min 16s (394 kb/s)
Reading Package Lists ... Done
After the update is complete, the Apt-get install operation can be completed quickly and successfully.

Ubuntu 12.04 Update Source

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.