Finding the fastest mirror: Difference between revisions

From Alpine Linux
(Add link to How to setup a Alpine Linux mirror)
(update mirrors url)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
After you install Alpine, you may be wondering how do I figure out the fastest mirror again?
After you install Alpine, you may be wondering how do I figure out the fastest mirror again?


You could run <code>/sbin/setup-apkrepos</code> again.
You could run <code>setup-apkrepos</code> again.


The following script shows the closest mirror for a single ping, which might not be accurate:
The following script shows the closest mirror for a single ping, which might not be accurate:
Line 7: Line 7:
{{Cat|/home/user/fastestmirror|<nowiki>
{{Cat|/home/user/fastestmirror|<nowiki>
data=""
data=""
for s in $(wget -qO- http://rsync.alpinelinux.org/alpine/MIRRORS.txt); do
for s in $(wget -qO- https://mirrors.alpinelinux.org/mirrors.txt); do
         t=$(time -f "%E" wget -q $s/MIRRORS.txt -O /dev/null 2>&1)
         t=$(time -f "%E" wget -q $s/MIRRORS.txt -O /dev/null 2>&1)
         echo "$s was $t"
         echo "$s was $t"

Latest revision as of 10:39, 4 November 2025

After you install Alpine, you may be wondering how do I figure out the fastest mirror again?

You could run setup-apkrepos again.

The following script shows the closest mirror for a single ping, which might not be accurate:

Contents of /home/user/fastestmirror

data="" for s in $(wget -qO- https://mirrors.alpinelinux.org/mirrors.txt); do t=$(time -f "%E" wget -q $s/MIRRORS.txt -O /dev/null 2>&1) echo "$s was $t" data="$data$t $s\n" done echo "===RESULTS===" echo -e $data | sort

See also