[Ubuntu系统] 【Ubuntu】Ubuntu 24.04 配置镜像源

131 0
Honkers 2025-8-21 09:58:33 来自手机 | 显示全部楼层 |阅读模式

【Ubuntu】Ubuntu 24.04 配置镜像源

零、起因

最近在虚拟机中安装了个ubuntu-24.04-desktop-amd64,默认是国外的软件源,很慢,故替换到国内。

壹、替换

源地址(阿里源)

其他版本的软件源文件内容看这里:https://developer.aliyun.com/mirror/ubuntu

软件源文件内容:

原位置(/etc/apt/sources.list)

  1. deb https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
  2. deb-src https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
  3. deb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
  4. deb-src https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
  5. deb https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
  6. deb-src https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
  7. # deb https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
  8. # deb-src https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
  9. deb https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
  10. deb-src https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
复制代码

新位置(/etc/apt/sources.list.d/ubuntu.sources)

  1. # 阿里云
  2. Types: deb
  3. URIs: http://mirrors.aliyun.com/ubuntu/
  4. Suites: noble noble-updates noble-security
  5. Components: main restricted universe multiverse
  6. Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
复制代码

选择一种方式(新位置)写入到对应文件中去

更新

更新完软件源后即可使用更新后的镜像源~

更新软件源:

  1. sudo apt-get update
复制代码

更新软件(可选):

  1. sudo apt-get upgrade
复制代码

贰、参考

  • ubuntu镜像_ubuntu下载地址_ubuntu安装教程-阿里巴巴开源镜像站
  • Ubuntu 24.04 抢先体验换国内源 清华源 阿里源 中科大源 163源
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行