Get fastest pacman mirrors
Way 2&3 need rankmirrors
, which provided by pacman-contrib
Way 1
- Go to successfully syncing mirrors of archlinux mirror status page: https://archlinux.org/mirrors/status/#successful
- Copy the first several mirrors, https protocol for privacy, 100% completion needed, the less mirror score, the better
Organize mirrors into this format:
1Server = MIRROR_URL_COPIED/$repo/os/$arch 2 3example: 4 5Server = https://mirror.osbeck.com/archlinux/$repo/os/$arch
- Save this file to
/etc/pacman.d/mirrorlist
Way 2
1curl -s "https://archlinux.org/mirrorlist/?country=CN&protocol=https&ip_version=4&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 -
Save the output to way 1 step 4 file location
Way 3
- Install reflector
txt reflector --sort rate --protocol https --latest 5 | rankmirrors -
- Save the output to way 1 step 4 file location