First, the role
File/etc/apt/sources.list is an ordinary editable text file that holds the address of the source server for Ubuntu software updates. The same as the Sources.list function is the/etc/apt/sources.list.d/*.list (* represents a file name, can only be composed of letters, numbers, underscores, English periods). The *.list file in the SOURCES.LIST.D directory provides a way to write the source's address in a separate file, typically to install third-party software.
Deb http://archive.ubuntu.com/ubuntu/trusty main restricted universe multiverseDeb http://archive.ubuntu.com/ubuntu/trusty-security main restricted universe multiverseDeb http://archive.ubuntu.com/ubuntu/trusty-updates main restricted universe multiverseDeb http://archive.ubuntu.com/ubuntu/trusty-proposed main restricted universe multiverseDeb http://archive.ubuntu.com/ubuntu/trusty-backports main restricted universe multiverseDEB-SRC http://archive.ubuntu.com/ubuntu/trusty main restricted universe multiverseDEB-SRC http://archive.ubuntu.com/ubuntu/trusty-security main restricted universe multiverseDEB-SRC http://archive.ubuntu.com/ubuntu/trusty-updates main restricted universe multiverseDEB-SRC http://archive.ubuntu.com/ubuntu/trusty-proposed main restricted universe multiverseDEB-SRC http://archive.ubuntu.com/ubuntu/trusty-backports main restricted universe multiverse
As above is the Ubuntu official Sources.list file content, the specific meaning is as follows:
Each line starts with Deb or DEB-SRC, which is installed directly through the. deb file and through the source file.
After the Deb or Deb-src field, is a URL, followed by five spaces separated by a string, respectively, corresponding to the corresponding directory structure. Enter http://archive.ubuntu.com/ubuntu/in the browser and enter the Dists directory, and you can see that there are 5 directories corresponding to the third column field in the Sources.list file above. Select one of the directories to enter, you can see and sources.list after the four column corresponding to the directory structure.
More content can be obtained using the man source.list.
Second, the choice of the source
Ubuntu official has its own source of software, directly from the official source of software to obtain data slower. And by some of the domestic source of the image to update the general can get faster than the official source, but the different domestic sources of download speed will also vary. Here is a more detailed list of Ubuntu software sources, individuals now think that the way to choose Ubuntu Software Source is to select the source in the same region, and then to Ping, the delay is not too high. Comparing the data of Aliyun, Sohu and Ubuntu official Ping, we can find that the source of Aliyun is the best in time delay.
Third, the cause and resolution of 404 Not Found problem using sudo apt-get install
When the sudo apt-get install command was recently used on 12.10, there was a problem with 404 Not Found, at which time Ping archive.ubuntu.com could ping through, in http://archive.ubuntu.com/ There are no quantal related directories in the ubuntu/dists/directory. The reason is that Ubuntu does not have 12.10 maintenance time of more than one year, after the corresponding time, the corresponding source files are transferred to the http://old-releases.ubuntu.com/ubuntu/dists/directory. Ubuntu releases can be seen from here, on the one hand you can see the Ubuntu digital version number and English name correspondence, you can also see the version of the 04 end of the LTS logo, identify long-term maintenance, these versions of the source in the archive.ubuntu.com time is longer.
Workaround:
1) Open the Sources.list file using Gedit
sudo gedit/etc/apt/sources.list
2) Replace operation in the replacement interface (Search->replace or ctrl+h)
Iv. How to install the Deb file directly
1) Download a deb-formatted software Kismet
Curl Https://www.kismetwireless.net/code/dists/quantal/kismet/binary-i386/kismet-2011.03.2.i386.deb > Kismet-2011.03.2.i386.deb
2) Install Kismet
Dpkg-i Kismet-2011.03.2.i386.deb
3) Follow the prompts to install the relevant package
sudo apt-get install LIBNL2
V. reference materials
[1]repository-how do-tell apt-use files In/etc/apt/sources.list.d-ask Ubuntu
[2] Source list-Ubuntu Chinese
[3] Releases-ubuntu Wiki
[4] How to fix Ubuntu/debian apt-get 404 No Found package Repository Errors (saucy, Raring, Quantal, Oneiric, natty ...) | smyl.es
[5] How does I install a. deb file via the command line Askubuntu
[6] Ubuntu. Deb Package Installation Method-Program life-Blog Channel-csdn.net
A summary of sources.list about Ubuntu