Ubuntu replaces Alibaba image source
Ubuntu replaces Alibaba image source
Why change the image?
Because after just installing the Ubuntu system , there is a source.list folder in the /etc/apt/ directory. The default is the official image, which is a server abroad! The download speed of all software will be very slow or even impossible to download!
Ubuntu
The official server is abroad . In order to improve the software installation/update speed, [ubuntu](/search?q=ubuntu)
it provides the function of selecting the best server , which can help us easily find the fastest mirror server!
So we need to change our mirror source to facilitate the download and installation of later files. The steps are as follows:
(Ubuntu20.04 uses the Alibaba image source as an example to replace the Alibaba image source):
1. Copy the original source.list to source.list.bak
1. Enter the directory
cd /etc/apt
2, backup the original data file (copy, rename the file)
cp source.list source.list.bak
2. Open source.list and change it to the Alibaba image source.
#vim source.list
# Press d + G to empty all the contents of the file.
#Ubuntu20.04
#Copy the source image into it (either by pasting it or installing vmware-tool to copy it from host to VM):
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
3. After vim edits the file, update the mirror source.
apt-get update
Congratulations, you are done here.
Attached: Ubuntu 16.04 version Alibaba image source file:
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe