配置文件说明
Ubuntu配置文件位置:/etc/apt/sources.list需要用root权限:$ sudo vi /etc/apt/sources.list
用vi、gedit、vs code等任何熟悉的编辑工具打开文件进行修改2种修改方式
1)把原文件中:,替换为:(或其他更新源网址)
2)直接复制下方的内容,覆盖原文件中的内容即可。修改完成后,更新本地安装包数据库
执行完这个操作后,可以用apt命令进行升级已有软件或者安装新的软件包。
$ sudo apt update
请选择和系统对应的版本
查看系统版本命令:
lsb_release -a
Distributor ID: UbuntuDescription: Ubuntu 22.04 LTSRelease: 22.04Codename: jammy
国内的更新源有多个,几个大互联网公司的源都比较稳定,没什么差别。这里整理的比较主流的、常用的几个LTS版本的更新源。
sources.list内容
1. Ubuntu 23.04 (lunar)更新源
# aliyundeb /ubuntu/ lunar main restricted universe multiversedeb-src /ubuntu/ lunar main restricted universe multiversedeb /ubuntu/ lunar-security main restricted universe multiversedeb-src /ubuntu/ lunar-security main restricted universe multiversedeb /ubuntu/ lunar-updates main restricted universe multiversedeb-src /ubuntu/ lunar-updates main restricted universe multiversedeb /ubuntu/ lunar-proposed main restricted universe multiversedeb-src /ubuntu/ lunar-proposed main restricted universe multiversedeb /ubuntu/ lunar-backports main restricted universe multiversedeb-src /ubuntu/ lunar-backports main restricted universe multiverse
# tsinghuadeb https://mirrors.tuna./ubuntu/ lunar main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ lunar main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ lunar-updates main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ lunar-updates main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ lunar-backports main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ lunar-backports main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ lunar-security main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ lunar-security main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ lunar-proposed main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ lunar-proposed main restricted universe multiverse
# 中科大deb https://mirrors./ubuntu/ lunar main restricted universe multiversedeb-src https://mirrors./ubuntu/ lunar main restricted universe multiversedeb https://mirrors./ubuntu/ lunar-updates main restricted universe multiversedeb-src https://mirrors./ubuntu/ lunar-updates main restricted universe multiversedeb https://mirrors./ubuntu/ lunar-backports main restricted universe multiversedeb-src https://mirrors./ubuntu/ lunar-backports main restricted universe multiversedeb https://mirrors./ubuntu/ lunar-security main restricted universe multiversedeb-src https://mirrors./ubuntu/ lunar-security main restricted universe multiversedeb https://mirrors./ubuntu/ lunar-proposed main restricted universe multiversedeb-src https://mirrors./ubuntu/ lunar-proposed main restricted universe multiverse
# 163deb /ubuntu/ lunar main restricted universe multiversedeb /ubuntu/ lunar-security main restricted universe multiversedeb /ubuntu/ lunar-updates main restricted universe multiversedeb /ubuntu/ lunar-proposed main restricted universe multiversedeb /ubuntu/ lunar-backports main restricted universe multiversedeb-src /ubuntu/ lunar main restricted universe multiversedeb-src /ubuntu/ lunar-security main restricted universe multiversedeb-src /ubuntu/ lunar-updates main restricted universe multiversedeb-src /ubuntu/ lunar-proposed main restricted universe multiversedeb-src /ubuntu/ lunar-backports main restricted universe multiverse
2. Ubuntu 22.04 (jammy)更新源
# aliyundeb /ubuntu/ jammy main restricted universe multiversedeb-src /ubuntu/ jammy main restricted universe multiversedeb /ubuntu/ jammy-security main restricted universe multiversedeb-src /ubuntu/ jammy-security main restricted universe multiversedeb /ubuntu/ jammy-updates main restricted universe multiversedeb-src /ubuntu/ jammy-updates main restricted universe multiversedeb /ubuntu/ jammy-proposed main restricted universe multiversedeb-src /ubuntu/ jammy-proposed main restricted universe multiversedeb /ubuntu/ jammy-backports main restricted universe multiversedeb-src /ubuntu/ jammy-backports main restricted universe multiverse
# tsinghuadeb https://mirrors.tuna./ubuntu/ jammy main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ jammy-updates main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy-updates main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ jammy-backports main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy-backports main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ jammy-security main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy-security main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ jammy-proposed main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy-proposed main restricted universe multiverse
# 中科大deb https://mirrors./ubuntu/ jammy main restricted universe multiversedeb-src https://mirrors./ubuntu/ jammy main restricted universe multiversedeb https://mirrors./ubuntu/ jammy-updates main restricted universe multiversedeb-src https://mirrors./ubuntu/ jammy-updates main restricted universe multiversedeb https://mirrors./ubuntu/ jammy-backports main restricted universe multiversedeb-src https://mirrors./ubuntu/ jammy-backports main restricted universe multiversedeb https://mirrors./ubuntu/ jammy-security main restricted universe multiversedeb-src https://mirrors./ubuntu/ jammy-security main restricted universe multiversedeb https://mirrors./ubuntu/ jammy-proposed main restricted universe multiversedeb-src https://mirrors./ubuntu/ jammy-proposed main restricted universe multiverse
# 163deb /ubuntu/ jammy main restricted universe multiversedeb /ubuntu/ jammy-security main restricted universe multiversedeb /ubuntu/ jammy-updates main restricted universe multiversedeb /ubuntu/ jammy-proposed main restricted universe multiversedeb /ubuntu/ jammy-backports main restricted universe multiversedeb-src /ubuntu/ jammy main restricted universe multiversedeb-src /ubuntu/ jammy-security main restricted universe multiversedeb-src /ubuntu/ jammy-updates main restricted universe multiversedeb-src /ubuntu/ jammy-proposed main restricted universe multiversedeb-src /ubuntu/ jammy-backports main restricted universe multiverse
3. ubuntu 20.04(focal) 更新源
# aliyundeb /ubuntu/ focal main restricted universe multiversedeb-src /ubuntu/ focal main restricted universe multiversedeb /ubuntu/ focal-security main restricted universe multiversedeb-src /ubuntu/ focal-security main restricted universe multiversedeb /ubuntu/ focal-updates main restricted universe multiversedeb-src /ubuntu/ focal-updates main restricted universe multiversedeb /ubuntu/ focal-proposed main restricted universe multiversedeb-src /ubuntu/ focal-proposed main restricted universe multiversedeb /ubuntu/ focal-backports main restricted universe multiversedeb-src /ubuntu/ focal-backports main restricted universe multiverse
# 中科大deb https://mirrors./ubuntu/ focal main restricted universe multiversedeb https://mirrors./ubuntu/ focal-updates main restricted universe multiversedeb https://mirrors./ubuntu/ focal-backports main restricted universe multiversedeb https://mirrors./ubuntu/ focal-security main restricted universe multiversedeb-src https://mirrors./ubuntu/ focal main restricted universe multiversedeb-src https://mirrors./ubuntu/ focal-updates main restricted universe multiversedeb-src https://mirrors./ubuntu/ focal-backports main restricted universe multiversedeb-src https://mirrors./ubuntu/ focal-security main restricted universe multiversedeb https://mirrors./ubuntu/ focal-proposed main restricted universe multiversedeb-src https://mirrors./ubuntu/ focal-proposed main restricted universe multiverse
# tsinghuadeb https://mirrors.tuna./ubuntu/ jammy main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ jammy-updates main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy-updates main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ jammy-backports main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy-backports main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ jammy-security main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy-security main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ jammy-proposed main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ jammy-proposed main restricted universe multiverse
# 163, neteasedeb /ubuntu/ focal main restricted universe multiversedeb /ubuntu/ focal-security main restricted universe multiversedeb /ubuntu/ focal-updates main restricted universe multiversedeb /ubuntu/ focal-backports main restricted universe multiversedeb-src /ubuntu/ focal main restricted universe multiversedeb-src /ubuntu/ focal-security main restricted universe multiversedeb-src /ubuntu/ focal-updates main restricted universe multiversedeb-src /ubuntu/ focal-backports main restricted universe multiversedeb /ubuntu/ focal-proposed main restricted universe multiversedeb-src /ubuntu/ focal-proposed main restricted universe multiverse
# Ubuntu 20.04自带sources.list# See /community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb /ubuntu/ focal main restricted# deb-src /ubuntu/ focal main restricted## Major bug fix updates produced after the final release of the## distribution.deb /ubuntu/ focal-updates main restricted# deb-src /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 /ubuntu/ focal universe# deb-src /ubuntu/ focal universedeb /ubuntu/ focal-updates universe# deb-src /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 /ubuntu/ focal multiverse# deb-src /ubuntu/ focal multiversedeb /ubuntu/ focal-updates multiverse# deb-src /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 /ubuntu/ focal-backports main restricted universe multiverse# deb-src /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 /ubuntu focal partner# deb-src /ubuntu focal partnerdeb /ubuntu/ focal-security main restricted# deb-src /ubuntu/ focal-security main restricteddeb /ubuntu/ focal-security universe# deb-src /ubuntu/ focal-security universedeb /ubuntu/ focal-security multiverse# deb-src /ubuntu/ focal-security multiverse
4. ubuntu 18.04(bionic) 更新源
# aliyundeb /ubuntu/ bionic main restricted universe multiversedeb-src /ubuntu/ bionic main restricted universe multiversedeb /ubuntu/ bionic-security main restricted universe multiversedeb-src /ubuntu/ bionic-security main restricted universe multiversedeb /ubuntu/ bionic-updates main restricted universe multiversedeb-src /ubuntu/ bionic-updates main restricted universe multiversedeb /ubuntu/ bionic-proposed main restricted universe multiversedeb-src /ubuntu/ bionic-proposed main restricted universe multiversedeb /ubuntu/ bionic-backports main restricted universe multiversedeb-src /ubuntu/ bionic-backports main restricted universe multiverse
# 中科大deb https://mirrors./ubuntu/ bionic main restricted universe multiversedeb-src https://mirrors./ubuntu/ bionic main restricted universe multiversedeb https://mirrors./ubuntu/ bionic-updates main restricted universe multiversedeb-src https://mirrors./ubuntu/ bionic-updates main restricted universe multiversedeb https://mirrors./ubuntu/ bionic-backports main restricted universe multiversedeb-src https://mirrors./ubuntu/ bionic-backports main restricted universe multiversedeb https://mirrors./ubuntu/ bionic-security main restricted universe multiversedeb-src https://mirrors./ubuntu/ bionic-security main restricted universe multiversedeb https://mirrors./ubuntu/ bionic-proposed main restricted universe multiversedeb-src https://mirrors./ubuntu/ bionic-proposed main restricted universe multiverse
# 163deb /ubuntu/ bionic main restricted universe multiversedeb /ubuntu/ bionic-security main restricted universe multiversedeb /ubuntu/ bionic-updates main restricted universe multiversedeb /ubuntu/ bionic-proposed main restricted universe multiversedeb /ubuntu/ bionic-backports main restricted universe multiversedeb-src /ubuntu/ bionic main restricted universe multiversedeb-src /ubuntu/ bionic-security main restricted universe multiversedeb-src /ubuntu/ bionic-updates main restricted universe multiversedeb-src /ubuntu/ bionic-proposed main restricted universe multiversedeb-src /ubuntu/ bionic-backports main restricted universe multiverse
# tsinghua universitydeb https://mirrors.tuna./ubuntu/ bionic main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ bionic main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ bionic-updates main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ bionic-updates main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ bionic-backports main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ bionic-backports main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ bionic-security main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ bionic-security main restricted universe multiversedeb https://mirrors.tuna./ubuntu/ bionic-proposed main restricted universe multiversedeb-src https://mirrors.tuna./ubuntu/ bionic-proposed main restricted universe multiverse
如果觉得《Ubuntu 23.04 22.04 20.04 18.04国内源--阿里云 中科大 163 清华更新源(sources.list)》对你有帮助,请点赞、收藏,并留下你的观点哦!