Use sed to replace the ubuntu image with domestic source
First, back up your sources.list and check the contents inside to avoid errors in sed replacement.
# cp /etc/apt/source.list /etc/apt/source.list.bak
Alibaba Cloud's speed is pretty good, just replace the fields in sources.list
# cd /etc/apt
# sed -i "s/archive.ubuntu.com/mirrors.aliyun.com/g" /etc/apt/sources.list
You can also use the 163 source:
mirrors.163.com 。
For different Ubuntu, the contents in sources.list are different.