Skip to content

Instantly share code, notes, and snippets.

@rdeavila
Created September 23, 2025 21:39
Show Gist options
  • Select an option

  • Save rdeavila/29400c21bfa63645b0d8f65e80d18669 to your computer and use it in GitHub Desktop.

Select an option

Save rdeavila/29400c21bfa63645b0d8f65e80d18669 to your computer and use it in GitHub Desktop.
Change almalinux repo from mirrorlist to local mirror
#!/bin/bash
cd cd /etc/yum.repos.d/
find . -type f -name "*.repo" -exec sed -i -e 's/^mirrorlist/#mirrorlist/' -e 's/^# baseurl/baseurl/' -e 's|https://repo.almalinux.org|http://100.99.229.21|g' {} +
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment