Ubuntu更换软件源

更换成阿里的软件仓库

1. 备份之前的文件:

cp /etc/apt/sources.list /etc/apt/sources.list.old

2. 编辑sources.list文件:

vi /etc/apt/sources.list

3. Insert 开始编辑,使用命令删除sources.list中已有内容:

删除光标所在行:dd

删除光标所在行以下的N行:Ndd

4. 清空后,粘贴以下内容:

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

5. ESC退出编辑,:wq保存并退出

6. 更新

sudo apt-get update

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容