Linux ubuntu apt-get

Source: Internet
Author: User

Linux ubuntu apt-get replaces the source ubuntu with the default source in the United States, so the download is particularly slow. as a user of tianchao, it is natural to replace it with the source of tianchao. Many sources are available in China, and some universities and companies are maintaining some sources. There are a lot of available on the Internet. Here is a simple method. Use vi and gedit to open/etc/apt/sources. list. replace all archive with cn. archive, so that you can use apt-get to download the source http://cn.archive.ubuntu.com later. Run the command in the vi Editor (switch to the root user first): root @ ubuntu:/# vi/etc/apt/sources. list to open sources. list in vi command mode (after entering the command line mode, press I to enter the edit mode, but the edit mode is not required here), enter: % s/us. archive/cn. archive/g is replaced. Input: wq! Save and exit. The symbol in the command is explained as follows: (colon), indicating that the command % (percent sign) is followed, indicating that the file content in the buffer is modified; that is to say, if the file is not saved, the source file will not change; so use: wq later! Command to save and exit the s (letter s), indicating to replace/us. archive/cn. archive. replace archive with cn. archive/g (float with the letter g) means to replace all the content so that the source of apt-get is changed to the domestic source. Next, you must restart apt-get, and the command apt-get update is ready. It has been tested that Beijing Netcom is very fast. For CERNET or China Telecom, if the speed is slow, you can find some other sources.

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.