First, back up the original source files
1. First, enter the directory where the source file sources.list is located:
cd /etc/apt/
2. Perform sudo cp sources.list sources.list.bak
a backup of the source files, just in case;
Second, modify the content of the source file
1. The contents of the Alibaba Cloud software source files are as follows:
#deb包
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # 源码 deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # Canonical 合作伙伴和附加 deb http://archive.canonical.com/ubuntu/ xenial partner deb http://extras.ubuntu.com/ubuntu/ xenial main
2. Copy all the content of the above Alibaba Cloud source files first
Use sudo vim sources.list
to open the file, enter to ggdG
delete all content (this command can be understood as the content from the first line to the last line is deleted)
Paste the copied content into this file; enter :wq
save and exit;
Three, update source and software
1. Use sudo apt-get update
to update the software list provided by Alibaba Cloud software source;
2. Use sudo apt-get upgrade
to update the software;