Ubuntu的source.list

本文提供了详细的Ubuntu源配置方法,包括备份原有源列表、修改源列表文件,并推荐了多个国内外的Ubuntu软件源,如欧洲官方源、中国官方源及多个教育网和电信服务器源等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

----------------NO.1--------------------------------------

 

 

在终端执行命令
备份当前的源列表,以便日后需要时恢复:

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup


终端使用命令 sudo gedit /etc/apt/sources.list

把里面全删除后在下面选一个粘上,保存

ubuntu的 欧洲 更新源

推荐大家使用这个更新源,因为更新比较多,而且中文化作的好

deb http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse

这个是中国的官方源,现在是双线路吧,我的很快ADSL到400K 网通(但是里面的东西比欧洲官方差很多)

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

上海市上海交通大学更新服务器(教育网,推荐校园网和网通用户使用):

deb http://ftp.sjtu.edu.cn/ubuntu/ hardy main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ hardy-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ hardy-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ hardy-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ hardy-updates main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ hardy-updates main multiverse restricted universe

中国科学技术大学更新服务器(教育网,推荐校园网和网通用户使用):
deb http://debian.ustc.edu.cn/ubuntu/ hardy main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-updates main multiverse restricted universe

sudo apt-get update 
sudo apt-get dist-upgrade

 

-------------------------------------NO.2----------------------------------------


 

ubuntu 6.10

deb http://ubuntu.cn99.com/ubuntu/ edgy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ edgy main restricted universe multiverse


deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ edgy-proposed main restricted universe multiverse

deb http://ubuntu.beryl-project.org/ edgy main
deb-src http://ubuntu.beryl-project.org edgy main
deb http://3v1n0.tuxfamily.org edgy beryl-svn


deb http://mirror.lupaworld.com/ubuntu edgy-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu edgy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu edgy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu edgy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn edgy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu edgy-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu edgy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu edgy-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu edgy-updates main restricted universe multiverse


deb http://cn.archive.ubuntu.com/ubuntu/ edgy main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ edgy main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ edgy-updates main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ edgy-updates main restricted

deb http://security.ubuntu.com/ubuntu edgy-security main restricted
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted


ubuntu 7.04

# Ubuntu.cn99.com 更新服务器(江苏省常州市电信,推荐电信用户使用。)
deb http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ edgy main restricted universe multiverse

# mirror.rootguide.org 更新服务器 (上海市 电信): 
deb http://mirror.rootguide.org/ubuntu/ edgy main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ edgy main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ edgy-updates main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ edgy-updates main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ edgy-backports main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ edgy-security main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ edgy-security main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ edgy-proposed main multiverse restricted universe
deb-src http://mirror.rootguide.org/ubuntu/ edgy-proposed main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu-cn/ edgy main multiverse restricted universe

#Mirror.vmmatrix.net 更新服务器(上海市电信,推荐电信网通用户使用)
deb http://mirror.vmmatrix.net/ubuntu/ feisty main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ feisty main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ feisty-updates main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ feisty-backports main restricted universe multiverse
deb http://mirror.vmmatrix.net/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://mirror.vmmatrix.net/ubuntu/ feisty-security main restricted universe multiverse
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ feisty main multiverse restricted universe

# Mirror.lupaworld.com 更新服务器(浙江省杭州市电信,亚洲地区官方更新服务器)
deb http://cn.archive.ubuntu.com/ubuntu feisty main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu feisty-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu feisty-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu feisty-backports main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu feisty-proposed main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu feisty main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu feisty-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu feisty-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu feisty-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu feisty-proposed main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn edgy main restricted universe multiverse

# ubuntu.cnsite.org 更新服务器(福建省福州市 电信)
deb http://ubuntu.cnsite.org/ubuntu/ feisty main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ feisty-proposed main multiverse restricted universe
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu-cn/ edgy main multiverse restricted universe

 

# 北京市清华大学 更新服务器(教育网,推荐校园网和网通用户使用)
deb http://mirror9.net9.org/ubuntu/ feisty main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ feisty-backports main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ feisty-proposed main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ feisty-security main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ feisty-updates main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ feisty main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ feisty-backports main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ feisty-proposed main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ feisty-security main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ feisty-updates main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu-cn/ edgy main multiverse restricted universe

#北京市清华大学 更新服务器(教育网,推荐校园网和网通用户使用):
deb http://mirror.net9.org/ubuntu/ feisty main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ feisty-backports main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ feisty-proposed main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ feisty-security main multiverse restricted universe
deb http://mirror.net9.org/ubuntu/ feisty-updates main multiverse restricted universe
deb http://mirror.net9.org/ubuntu-cn/ feisty main multiverse restricted universe

#清华大学更新服务器 更新服务器(传说中真正可用的源,教育网用户):
deb ftp://ftp3.tsinghua.edu.cn/mirror/ubuntu/ubuntu/ feisty main restricted universe multiverse
deb ftp://ftp3.tsinghua.edu.cn/mirror/ubuntu/ubuntu/ feisty-security main restricted universe multiverse
deb ftp://ftp3.tsinghua.edu.cn/mirror/ubuntu/ubuntu/ feisty-updates main restricted universe multiverse

#中国科技大学 更新服务器 5M/s(这个牛X啊!)
deb http://debian.ustc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse

#教育网用户请使用上海交通大学的源(教育网,推荐校园网和网通用户使用)
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-updates main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ feisty main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty-updates main multiverse restricted universe

#兰州大学更新服务器
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty-backports main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty-proposed main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty-security main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty-updates main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu-cn/ feisty main multiverse restricted universe

#传说中的北京交大 更新服务器
deb http://mirror.bjtu.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/ubuntu/ feisty-backports main restricted universe multiverse

 

<think>嗯,用户问的是如何在Ubuntu中配置source.list文件。首先,我得回想一下自己之前接触过的相关知识。记得source.list是APT用来管理软件源的,里面存放了软件仓库的地址。用户可能需要更换源,比如换成国内的镜像源,这样下载软件会更快。 首先,我应该确认source.list的位置,是在/etc/apt/目录下对吧?根据引用[2]提到的,这个文件以及sources.list.d目录下的.list文件都是APT管理的。用户可能需要备份原来的文件,避免改错后无法恢复。引用[3]和[4]里提到了恢复默认源的方法,可能用户误删或者改错了需要还原,所以步骤中应该包括备份操作。 接下来,用户需要编辑source.list文件。使用sudo权限,比如用nano或者vim。但有些用户可能不熟悉命令行编辑器,所以推荐使用图形工具像software-properties-gtk,这样更友好。引用[5]提到URL和section的部分,需要解释每个字段的含义,比如deb后面跟着地址、发行版代号和组件。比如Ubuntu 20.04的代号是focal,组件有main、restricted等。 然后,替换源的时候要选合适的镜像源。比如阿里云、清华源等,用户可能需要具体的替换示例。这里需要确保示例中的代号和组件正确,比如focal对应20.04,jammy对应22.04。同时提醒用户根据自己系统版本修改,避免直接复制导致错误。 更新软件列表是必须的步骤,执行sudo apt update后检查有没有错误,如果有,可能是源地址拼写错误或者组件不对。这时候需要用户检查格式是否正确,或者换其他镜像源。 可能用户遇到的问题包括:编辑文件时权限不足,所以需要用sudo;备份文件的方法;如何查找适合自己系统版本的源地址。此外,引用[3]提到恢复默认源的方法,用户如果改错了可以参考这个步骤,用echo命令生成默认内容。 最后,相关的问题部分需要考虑用户可能进一步的问题,比如如何添加PPA源,或者临时禁用某个源,这些可以在相关问题里提到,引导用户继续了解。</think>### Ubuntu中配置source.list文件的步骤 #### 1. **备份原始文件** 在修改前必须备份原文件,避免误操作导致系统软件管理异常: ```bash sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak ``` 若需恢复默认源,可使用`sudo mv /etc/apt/sources.list.bak /etc/apt/sources.list`[^3][^4]。 #### 2. **编辑sources.list文件** 使用文本编辑器(如`nano`或`vim`)修改文件: ```bash sudo nano /etc/apt/sources.list ``` 也可通过图形工具`software-properties-gtk`管理软件源(需安装)。 #### 3. **配置软件源格式** 文件内容遵循以下格式: ```bash deb [协议] [镜像地址] [发行版代号] [组件] ``` - **协议**: 如`http`、`https`或`file`(本地镜像) - **发行版代号**: 通过`lsb_release -sc`查询(如Ubuntu 22.04为`jammy`) - **组件**: 如`main`(官方支持)、`restricted`(受限版权)、`universe`(社区维护)等[^5]。 #### 4. **替换镜像源示例(以阿里云为例)** ```bash # Ubuntu 20.04 (focal) deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse ``` 不同版本需替换`focal`为对应代号(如`jammy`对应22.04)[^2][^5]。 #### 5. **更新软件列表** 修改完成后执行: ```bash sudo apt update ``` 若出现错误,需检查地址格式或镜像可用性。 --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值