Finding the fastest mirror

From Alpine Linux
Revision as of 08:45, 7 July 2024 by WhyNotHugo (talk | contribs) (Add link to How to setup a Alpine Linux mirror)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

You could run /sbin/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- http://rsync.alpinelinux.org/alpine/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