Linux config source

{

deb-src http://archive.ubuntu.com/ubuntu xenial main restricted
#Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe
#Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe
#Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
#Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe
#Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse








#deb http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
 
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
 
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
 
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
 
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse





deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse








}

適用於 15.10 的基礎配置(詳細):

deb http://cn.archive.ubuntu.com/ubuntu/ willy main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ willy-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ willy-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ willy-backports main restricted universe multiverse
##測試版源
deb http://cn.archive.ubuntu.com/ubuntu/ willy-proposed main restricted universe multiverse
# 源碼 deb-src http://cn.archive.ubuntu.com/ubuntu/ willy main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-security main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-updates main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-backports main restricted universe multiverse ##測試版源 deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-proposed main restricted universe multiverse


如要用於其他版本,把 willy 換成版本代號就好:

18.04
bionic詳細
17.10
artful詳細
16.04
xenial詳細
14.04
trusty詳細

1. 备份源列表

Ubuntu缺省的配置的源并不是国内的服务器,下载更新软件都比较慢,本文介绍如何设置源列表,选择比较快的源以节省下载时间。

# 首先备份源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

2. 打开sources.list文件修改

选择合适的源,替换原文件的内容,保存编辑好的文件, 以阿里云更新服务器为例(从实际测试上结果分析,个人认为阿里云比网易和搜狐的服务器要快):

sudo vim /etc/apt/sources.list

3. 阿里云镜像源-清华镜像源

注意根据具体使用的Ubuntu的版本不同,将文本中trusty替换为下面对应版本的字符串:

版本 版本号 代号
Lucid(10.04) 10.04 lucid
Precise(12.04): precise 12.04 precise
Trusty(14.04): trusty 14.04 trusty
Utopic(14.10): utopic 14.10 utopic
Ubuntu 16.04 TLS: xenial 16.04 xenial
Ubuntu 18.04 TLS: bionic 18.04 bionic

猜你喜欢

转载自www.cnblogs.com/YZFHKMS-X/p/12815552.html
今日推荐