Ubuntu apt-get 设置阿里云源代理

由于 apt-get 默认的源为国外服务,在使用 apt-get 软件时下载速度很慢,这时我们可以为 apt-get 设置成国内镜像代理。

# vim /etc/apt/sources.list

使用 vim 编辑 sources.list:

deb http://mirrors.cloud.aliyuncs.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.cloud.aliyuncs.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.cloud.aliyuncs.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.cloud.aliyuncs.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.cloud.aliyuncs.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

# apt-get update

update 之后可以愉快的使用 apt-get 了。

猜你喜欢

转载自blog.csdn.net/xiaoping0915/article/details/79439771