【Ubuntu】Ubuntu 配置镜像源(ARM)
【Ubuntu】Ubuntu 配置镜像源(ARM)
零、起因
最近在QEMU
中安装了个ubuntu-24.04-live-server-arm64
,默认是国外的软件源,很慢,故替换到国内。
壹、替换
源地址(清华源)
https://mirror.tuna.tsinghua.edu.cn/help/ubuntu-ports/
软件源文件内容:
传统格式(/etc/apt/sources.list
)
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-backports main restricted universe multiverse # 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换 deb http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse # deb-src http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse # 预发布软件源,不建议启用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-proposed main restricted universe multiverse # # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-proposed main restricted universe multiverse
DEB822 格式(/etc/apt/sources.list.d/ubuntu.sources
)
Types: deb URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports Suites: noble noble-updates noble-backports Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 # Types: deb-src # URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports # Suites: noble noble-updates noble-backports # Components: main restricted universe multiverse # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg # 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换 Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble-security Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg # Types: deb-src # URIs: http://ports.ubuntu.com/ubuntu-ports/ # Suites: noble-security # Components: main restricted universe multiverse # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg # 预发布软件源,不建议启用 # Types: deb # URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports # Suites: noble-proposed # Components: main restricted universe multiverse # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg # # Types: deb-src # # URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports # # Suites: noble-proposed # # Components: main restricted universe multiverse # # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
选择一种方式写入到对应文件中去,更新软件源:
sudo apt-get update sudo apt-get upgrade
更新完软件源后即可使用更新后的镜像源~
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步