AskApache.comSo if you don't already know, I am a long-time user and supporter of Arch Linux. Arch uses a package management tool called pacman that works similarly to yum or apt, but much better IMHO. It uses a list of mirrors to perf...
AskApache.comSo if you don't already know, I am a long-time user and supporter of Arch Linux. Arch uses a package management tool called pacman that works similarly to yum or apt, but much better IMHO. It uses a list of mirrors to perform the actual downloading of the package files, so you want the fastest mirrors to be in the mirror list. The old way is to use reflector to rank the speed of the mirrors, which is a python script. My way is pure bash using curl, sed, awk, xargs, and sort. Very simple and IMHO more effective than reflector.
Creating /etc/pacman.d/mirrorlist
Just run the script and redirect the output to /etc/pacman.d/mirrorlist like this:
$ ./reflector.sh | sudo tee /etc/pacman.d/mirrorlist
How it works
Well it's simple, essentially it performs these steps:
Fetch the current list of (only current 100%) mirrors from the official site.
Use curl to request a small 257 byte file from each of those mirrors (about 200-300), 40 at a time and save the fastest 50. This also gets the dns cached