1. sources.list
sources.list
Located /etc/apt
directory, is a common editable text file, ubuntu software update contains the address of the source server.
2. sources.list.d/*.list
sources.list.d/*.list
Located in /etc/apt/sources.list.d
the directory, it provides a way for the write address source in a separate file that is typically used to install third-party software.
3. In other source
First check your Ubuntu system Codename (This step is very important), led directly to the source if you update your system from the effects of view by:
lzb@lzb:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.6 LTS Release: 16.04 Codename: xenial
LSB is a set of core standards, it guarantees a good bond between the LINUX LINUX distributions with applications. Linux it is the de facto standard in the field of standardization, we developed a binary interface between the application and the operating environment. Here detected LSB, the module does not acquire, obtain the following statement:
lzb@lzb:~$ sudo apt install lsb-core -y
lzb@lzb:~$ lsb_release -a
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
4. Get mirror source
地址分类名称
阿里云
great http://mirrors.aliyun.com/ubuntu/dists/xenial/
great-backports http://mirrors.aliyun.com/ubuntu/dists/xenial-backports/
great-proposed http: // mirrors.aliyun.com/ubuntu/dists/xenial-proposed/
great-security http://mirrors.aliyun.com/ubuntu/dists/xenial-security/
great-updates http://mirrors.aliyun.com/ubuntu/ dists / great-updates /
清华
great https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial
great-proposed https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-proposed
great-security https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-security
great-updates https: //mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/xenial-updates
5. Select suitable source
lzb@lzb:~$ ping mirrors.aliyun.com PING mirrors.aliyun.com.w.alikunlun.com (117.34.34.236) 56(84) bytes of data. 64 bytes from 117.34.34.236: icmp_seq=1 ttl=54 time=3.91 ms 64 bytes from 117.34.34.236: icmp_seq=2 ttl=54 time=4.18 ms 64 bytes from 117.34.34.236: icmp_seq=3 ttl=54 time=3.68 ms 64 bytes from 117.34.34.236: icmp_seq=4 ttl=54 time=7.89 ms
lzb@lzb:~$ ping mirrors.tuna.tsinghua.edu.cn PING cdnmirrors.s.tuna.tsinghua.edu.cn (101.6.8.193) 56(84) bytes of data. 64 bytes from 101.6.8.193: icmp_seq=1 ttl=241 time=19.4 ms 64 bytes from 101.6.8.193: icmp_seq=2 ttl=241 time=19.8 ms 64 bytes from 101.6.8.193: icmp_seq=3 ttl=241 time=21.4 ms 64 bytes from 101.6.8.193: icmp_seq=4 ttl=241 time=19.6 ms
Ali found the source faster.
6. Back up and modify the sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.beifen.list sudo gedit /etc/apt/sources.list sudo apt update