配置文件说明

Ubuntu配置文件位置:/etc/apt/sources.list需要用root权限:

$ sudo vi /etc/apt/sources.list

用vi、gedit、vs code等任何熟悉的编辑工具打开文件进行修改2种修改方式 1)把原文件中:archive.ubuntu.com,替换为:archive.aliyun.com(或其他更新源网址) 2)直接复制下方的内容,覆盖原文件中的内容即可。修改完成后,更新本地安装包数据库 执行完这个操作后,可以用apt命令进行升级已有软件或者安装新的软件包。

$ sudo apt update

请选择和系统对应的版本 查看系统版本命令:lsb_release -a Distributor ID: Ubuntu

Description: Ubuntu 22.04 LTS

Release: 22.04

Codename: jammy

国内的更新源有多个,几个大互联网公司的源都比较稳定,没什么差别。这里整理的比较主流的、常用的几个LTS版本的更新源。

sources.list内容

1. Ubuntu 23.04 (lunar)更新源

# aliyun

deb http://mirrors.aliyun.com/ubuntu/ lunar main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ lunar main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ lunar-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ lunar-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ lunar-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ lunar-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ lunar-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ lunar-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ lunar-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ lunar-backports main restricted universe multiverse

# tsinghua

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-updates main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-backports main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-security main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-security main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-proposed main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-proposed main restricted universe multiverse

# 中科大

deb https://mirrors.ustc.edu.cn/ubuntu/ lunar main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ lunar main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-updates main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ lunar-updates main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-backports main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ lunar-backports main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-security main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ lunar-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ lunar-proposed main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ lunar-proposed main restricted universe multiverse

# 163

deb http://mirrors.163.com/ubuntu/ lunar main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ lunar-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ lunar-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ lunar-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ lunar-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ lunar main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ lunar-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ lunar-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ lunar-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ lunar-backports main restricted universe multiverse

2. Ubuntu 22.04 (jammy)更新源

# aliyun

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

# tsinghua

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

# 中科大

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

# 163

deb http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse

3. ubuntu 20.04(focal) 更新源

# aliyun

deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

# 中科大

deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

# tsinghua

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

# 163, netease

deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse

# Ubuntu 20.04自带sources.list

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

# newer versions of the distribution.

deb http://archive.ubuntu.com/ubuntu/ focal main restricted

# deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the

## distribution.

deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted

# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team. Also, please note that software in universe WILL NOT receive any

## review or updates from the Ubuntu security team.

deb http://archive.ubuntu.com/ubuntu/ focal universe

# deb-src http://archive.ubuntu.com/ubuntu/ focal universe

deb http://archive.ubuntu.com/ubuntu/ focal-updates universe

# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team, and may not be under a free licence. Please satisfy yourself as to

## your rights to use the software. Also, please note that software in

## multiverse WILL NOT receive any review or updates from the Ubuntu

## security team.

deb http://archive.ubuntu.com/ubuntu/ focal multiverse

# deb-src http://archive.ubuntu.com/ubuntu/ focal multiverse

deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse

# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as

## extensively as that contained in the main release, although it includes

## newer versions of some applications which may provide useful features.

## Also, please note that software in backports WILL NOT receive any review

## or updates from the Ubuntu security team.

deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

# deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's

## 'partner' repository.

## This software is not part of Ubuntu, but is offered by Canonical and the

## respective vendors as a service to Ubuntu users.

# deb http://archive.canonical.com/ubuntu focal partner

# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu/ focal-security main restricted

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

deb http://security.ubuntu.com/ubuntu/ focal-security universe

# deb-src http://security.ubuntu.com/ubuntu/ focal-security universe

deb http://security.ubuntu.com/ubuntu/ focal-security multiverse

# deb-src http://security.ubuntu.com/ubuntu/ focal-security multiverse

4. ubuntu 18.04(bionic) 更新源

# aliyun

deb https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

# 中科大

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

# 163

deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

# tsinghua university

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

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

好文链接

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: