【Ubuntu】Ubuntu 配置镜像源(ARM)

时间:2025-01-30 12:38:25

【Ubuntu】Ubuntu 配置镜像源(ARM)

零、起因

最近在QEMU中安装了个ubuntu-24.04-live-server-arm64,默认是国外的软件源,很慢,故替换到国内。

壹、替换

源地址(清华源)

/help/ubuntu-ports/

软件源文件内容:

传统格式(/etc/apt/

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb /ubuntu-ports/ noble main restricted universe multiverse
# deb-src /ubuntu-ports/ noble main restricted universe multiverse
deb /ubuntu-ports/ noble-updates main restricted universe multiverse
# deb-src /ubuntu-ports/ noble-updates main restricted universe multiverse
deb /ubuntu-ports/ noble-backports main restricted universe multiverse
# deb-src /ubuntu-ports/ noble-backports main restricted universe multiverse

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb /ubuntu-ports/ noble-security main restricted universe multiverse
# deb-src /ubuntu-ports/ noble-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb /ubuntu-ports/ noble-proposed main restricted universe multiverse
# # deb-src /ubuntu-ports/ noble-proposed main restricted universe multiverse

DEB822 格式(/etc/apt//

Types: deb
URIs: /ubuntu-ports
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
# Types: deb-src
# URIs: /ubuntu-ports
# Suites: noble noble-updates noble-backports
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
Types: deb
URIs: /ubuntu-ports/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/

# Types: deb-src
# URIs: /ubuntu-ports/
# Suites: noble-security
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/

# 预发布软件源,不建议启用

# Types: deb
# URIs: /ubuntu-ports
# Suites: noble-proposed
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/

# # Types: deb-src
# # URIs: /ubuntu-ports
# # Suites: noble-proposed
# # Components: main restricted universe multiverse
# # Signed-By: /usr/share/keyrings/

选择一种方式写入到对应文件中去,更新软件源:

sudo apt-get update
sudo apt-get upgrade

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

贰、参考

  • Ubuntu Ports 软件仓库
  • 如何在 Ubuntu 上启用 SSH,安全地远程管理和传输数据
  • WIN10 x86环境部署ARM虚拟机(银河麒麟)实例