Linux system replacement source: Ubuntu 18.04 LTS replacement domestic source

Ubuntu 18.04 LTS replaces domestic sources

The ubuntu18.04 LTS download software is a bit slow. I searched the Internet for the solution. It is roughly to replace the source in the /etc/apt/sources.list file and change it to Alibaba Cloud or other mirrored files.

1. Change source-change the source in the /etc/apt/sources.list file

Change the source in the /etc/apt/sources.list file to Alibaba Cloud or other mirrored files

2. List of backup sources

The default source of Ubuntu configuration is not a domestic server, and downloading and updating software is relatively slow. First back up the source list file sources.list:

//首先备份源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

3. Open the sources.list file to modify

Select the appropriate source, replace the content of the original file, save the edited file, take Alibaba Cloud update server as an example (you can test the speed of Alibaba Cloud, Tsinghua University, University of Science and Technology, and 163 sources respectively, and choose the fastest):

// 打开sources.list文件
sudo gedit /etc/apt/sources.list
Edit the /etc/apt/sources.list file, add Alibaba Cloud mirror sources at the top of the file or delete all of them and add them:

Alibaba Cloud Source

// 阿里源
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

After the change is completed, enter the update source, and run this to update the list before installing anything with apt.

sudo apt update

Tsinghuayuan

# 清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

University of Science and Technology of China

#  中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

Link: Ubuntu 18.04 LTS replacement domestic source

Guess you like

Origin blog.csdn.net/m0_37882192/article/details/109579763