Ubuntu 24.04 Noble 配置国内镜像源备份旧源在覆盖之前先备份原有的 sources.listcp/etc/apt/sources.list /etc/apt/sources.list.bak配置双源阿里 清华使用以下命令一键写入 sources.list两套源用注释区分想用哪套就放开哪套cat/etc/apt/sources.listzc # 清华镜像源推荐教育网/国内通用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-security main restricted universe multiverse # 阿里云镜像源云服务器首选 deb http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse # 源码包不需要则保持注释 # 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 # deb-src http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse # deb-src http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse # deb-src http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse # deb-src http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse zc刷新生效aptupdate切换使用方法用阿里云当前默认执行写入命令后直接刷新即可aptupdate切换到清华源编辑/etc/apt/sources.listvi/etc/apt/sources.list操作步骤在阿里云四行前面全部加#注释掉删掉清华四行开头的#取消注释保存后执行apt update重要提醒千万不要两套同时取消注释apt 会并行请求两个镜像导致下载重复、速度变慢还会出现 GPG 校验、版本冲突报错同一时间只保留一套源生效