---------------------------------------------------------
Reference article: https: //www.jianshu.com/p/97c35d569aa3
---------------------------------------------------------
Ubuntu comes because the source server in a foreign country, download and update the software when the speed is very slow, unstable, so it is necessary to update the source for domestic sources. More domestic sources, Ali is commonly used source.
1. Back up the original source files, easy rollback in case of replacement problems
sudo cp /etc/apt/sources.list /etc/apt/source.list.bk
2. Change the sources.list file
vim /etc/apt/sources.list
Replace the contents of which are
# 阿里源 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
It should be noted that the different versions of ubuntu release the corresponding source is not the same, the main difference in the version number
Ubuntu 12.04 (LTS), code-named precise.
Ubuntu 14.04 (LTS), code-named trusty.
Ubuntu 15.04 codenamed vivid.
Ubuntu 15.10, code-named wily.
Ubuntu 16.04 (LTS), code-named xenial.
Ubuntu 18.04 (LTS), code-named bionic.
My current version is version number 18.04 so there is bionic, if the version number is a direct replacement for other inside the version number can be.
See your ubuntu version:
lsb_release -c
3. Update source
sudo apt update