Ubuntu16.04 replaces Alibaba Cloud software source

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.baka 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.listto open the file, enter to ggdGdelete 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 :wqsave and exit;

Three, update source and software

1. Use sudo apt-get updateto update the software list provided by Alibaba Cloud software source;
2. Use sudo apt-get upgradeto update the software;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325048427&siteId=291194637