Fedora China Mirrors: Tsinghua & Aliyun Repository Setup

Fedora 36+ uses DNF for package management — config files are in /etc/yum.repos.d/.

Tsinghua Mirror

Bash
sudo sed -i 's/metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora/#mirrorlist=https://mirrors.tuna.tsinghua.edu.cn/fedora/metalink?repo=fedora/g' /etc/yum.repos.d/fedora.repo
sudo sed -i 's/metalink=https://mirrors.fedoraproject.org/metalink?repo=updates/#mirrorlist=https://mirrors.tuna.tsinghua.edu.cn/fedora/updates/?metalink/g' /etc/yum.repos.d/fedora-updates.repo
sudo dnf makecache

Aliyun Mirror

Bash
sudo sed -i 's/metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora/#mirrorlist=https://mirrors.aliyun.com/fedora/mirrors/metalink?repo=fedora/g' /etc/yum.repos.d/fedora.repo
sudo dnf makecache

It’s even better if you also switch the Fedora extras repository.

Last modified: 2026年7月6日

Author

Comments

Write a Reply or Comment

Your email address will not be published.