修改Ubuntu的aptget源为阿里源的方法

2017-11-27  本文已影响0人  江魁

?xml version="1.0" encoding="UTF-8"?

1、复制原文件备份

sudo cp /etc/apt/source.list /etc/apt/source.list.bak

2、编辑源列表文件

sudo vim /etc/apt/source.list

3、将原来的列表删除,添加如下内容

debhttp://mirrors.aliyun.com/ubuntu/vivid main restricted universe multiverse

debhttp://mirrors.aliyun.com/ubuntu/vivid-security main restricted universe multiverse

debhttp://mirrors.aliyun.com/ubuntu/vivid-updates main restricted universe multiverse

debhttp://mirrors.aliyun.com/ubuntu/vivid-proposed main restricted universe multiverse

debhttp://mirrors.aliyun.com/ubuntu/vivid-backports main restricted universe multiverse

deb-srchttp://mirrors.aliyun.com/ubuntu/vivid main restricted universe multiverse

deb-srchttp://mirrors.aliyun.com/ubuntu/vivid-security main restricted universe multiverse

deb-srchttp://mirrors.aliyun.com/ubuntu/vivid-updates main restricted universe multiverse

deb-srchttp://mirrors.aliyun.com/ubuntu/vivid-proposed main restricted universe multiverse

deb-srchttp://mirrors.aliyun.com/ubuntu/vivid-backports main restricted universe multiverse

4、运行sudo apt-get update

5、运行sudo apt-get upgrade

上一篇下一篇

猜你喜欢

热点阅读