Ubuntu apt-get如何设置阿里云源代理?
程序员文章站
2022-04-07 10:01:31
由于 apt-get 默认的源为国外服务,在使用 apt-get 软件时下载速度很慢,这时我们可以为 apt-get 设置成国内镜像代理。
# vim /etc/apt/sources.li...
由于 apt-get 默认的源为国外服务,在使用 apt-get 软件时下载速度很慢,这时我们可以为 apt-get 设置成国内镜像代理。
# vim /etc/apt/sources.list
使用 vim 编辑 sources.list:
deb https://mirrors.cloud.aliyuncs.com/ubuntu/ trusty main restricted universe multiverse deb https://mirrors.cloud.aliyuncs.com/ubuntu/ trusty-security main restricted universe multiverse deb https://mirrors.cloud.aliyuncs.com/ubuntu/ trusty-updates main restricted universe multiverse deb https://mirrors.cloud.aliyuncs.com/ubuntu/ trusty-proposed main restricted universe multiverse deb https://mirrors.cloud.aliyuncs.com/ubuntu/ trusty-backports main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
# apt-get update
update 之后可以愉快的使用 apt-get 了。