ubuntu16.04LTS设置apt源
Ubuntu是一个基于Debian的Linux操作系统,由Canonical公司支持和维护。Ubuntu以其易用性、社区支持和定期更新而闻名.
ubuntu mirror
check version
steps
1.配置国内加速源
/etc/apt/sources.list
阿里云
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
#清华大学
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
2.更换缓存索引
apt-get update
deb源字段解释
//如下
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb: 这是Debian软件包格式的标识符,表示这是一个.deb格式的软件包源。
http://mirrors.aliyun.com/ubuntu/: 这是镜像源的URL地址,它指向阿里云提供的Ubuntu软件包镜像站点。通过使用镜像站点,可以加快软件包的下载速度,尤其是在中国地区。
xenial: 这是Ubuntu 16.04 LTS版本的代号。Ubuntu的每个发行版都有一个代号,用于区分不同的版本。在APT配置文件中使用代号来指定软件包的版本。
main: Ubuntu软件源的一个组件,包含由Ubuntu团队支持的免费和开源软件包。
restricted: 包含一些受限的软件包,这些软件包可能由于法律或版权问题没有包含在main组件中。
universe: 包含由社区维护的免费和开源软件包,数量非常庞大。
multiverse: 包含不自由的软件包,这些软件包可能由于版权或法律问题没有包含在其他组件中