Rocky Linux Repo Mirrors Usage Guide

Select Mirror

For Rocky Linux 8, replace the default configuration with the following command.

sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
         -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://(Loading...)|g' \
         -i.bak \
         /etc/yum.repos.d/Rocky-AppStream.repo \
         /etc/yum.repos.d/Rocky-BaseOS.repo \
         /etc/yum.repos.d/Rocky-Extras.repo \
         /etc/yum.repos.d/Rocky-PowerTools.repo

For Rocky Linux 9, replace the default configuration with the following command.

sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
         -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://(Loading...)|g' \
         -i.bak \
         /etc/yum.repos.d/rocky-extras.repo \
         /etc/yum.repos.d/rocky.repo

The above command only replaces the default enabled repo. After replacing, run dnf makecache to update the cache.

Is there an issue? Report via GitHub Issue

Would you like to contribute? Contribution Guide.Source code on GitHub.

All content is provided under the terms of the CC BY-NC-SA 4.0 license, additional terms may also apply.