Ubuntu18.04 replace the package source (Tsinghua source)

1. The source of the original software backup
the sudo CP /etc/apt/sources.list /etc/apt/sources.list.backup

2. opening a new terminal in the terminal input
sudo vim /etc/apt/source.list


3. source.list contents of the documents into the following (you can also comment out the original)

# default image annotated source code to improve the apt update speed, if necessary cancel their own comments
deb https: //mirrors.tuna .tsinghua.edu.cn / Ubuntu-the ports / Bionic main Tel Restricted Universe Multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ Bionic main Tel Restricted Universe Multiverse
deb HTTPS: // Mirrors. Bionic-the Updates main Tel Restricted tuna.tsinghua.edu.cn/ubuntu-ports/ Universe Multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ Bionic-the Updates main Tel Restricted Universe Multiverse
deb HTTPS : //mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ Bionic-backports main Tel Restricted Universe Multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ Bionic-backports main restricted universe multiverse
Security main https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ Bionic-deb Tel Restricted Universe Multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic- Restricted Universe Multiverse main Security

4. save and exit, in the terminal input
sudo apt-get update

Guess you like

Origin www.cnblogs.com/kaishirenshi/p/12549533.html
Recommended