关键词: Ubuntu 24.04源、国内APT源、Linux换源教程、软件源加速
对于使用Ubuntu 24.04.3 LTS (NobleNumbat) 的用户,默认的软件源服务器在国外,下载速度往往很慢。将APT源更换为国内镜像(如清华、阿里云、中科大等)可以显著提升软件包下载和系统更新速度。本文适合小白用户,每一步都有详细说明。
打开终端(快捷键Ctrl+Alt+T),输入以下命令确认系统版本是否为Ubuntu 24.04.3 LTS (NobleNumbat):
lsb_release -a 你应该看到类似 Description: Ubuntu 24.04.3 LTS 和 Codename: noble 的信息。
修改前先备份,以便出错时恢复:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 使用nano或vim编辑sources.list:
sudo nano /etc/apt/sources.list 清空原有内容,填入以下国内镜像源(以清华源为例,你也可以选择阿里云、中科大等):
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-security main restricted universe multiverse# deb-src 源(如需源码可取消注释)# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-security main restricted universe multiverse 按Ctrl+O保存,Ctrl+X退出(nano)。
运行以下命令更新软件包列表:
sudo apt update 如果看到大量下载信息且速度很快,说明换源成功。接着可以升级已安装软件:
sudo apt upgrade -y 除了清华源,阿里云和中科大源也同样稳定快速。例如阿里云Ubuntu 24.04源配置如下:
deb https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse 你可以根据喜好选择其中一个。至此,Ubuntu 24.04.3 LTS的APT国内源更换就完成了,享受飞一般的下载速度吧!
本文关键词:Ubuntu 24.04源、国内APT源、Linux换源教程、软件源加速 —— 记得在操作时替换为实际的国内镜像地址。
本文由主机测评网于2026-03-06发表在主机测评网_免费VPS_免费云服务器_免费独立服务器,如有疑问,请联系我们。
本文链接:https://www.vpshk.cn/20260329085.html