Rocky Linux China Mirrors: Quick Setup for Tsinghua & Aliyun

Rocky Linux is a RHEL derivative — changing mirrors works exactly the same as Fedora.

Tsinghua Mirror

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

Aliyun Mirror

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

Verified working on Rocky Linux 9 — the commands are the same for other versions.

Last modified: 2026年7月6日

Author

Comments

Write a Reply or Comment

Your email address will not be published.