Skip to content

Instantly share code, notes, and snippets.

@illvart
Last active April 19, 2023 12:29
Show Gist options
  • Save illvart/3ac7c21617513627a906d314f63a7eca to your computer and use it in GitHub Desktop.
Save illvart/3ac7c21617513627a906d314f63a7eca to your computer and use it in GitHub Desktop.

Aliases ~/.bashrc or ~/.zshrc:

alias pmr='sudo reflector -c "Indonesia" -c "Singapore" -c "US" -c "China" --score 100 --latest 25 --sort rate --save /etc/pacman.d/mirrorlist --verbose'
alias update-mirror='pmr && cat /etc/pacman.d/mirrorlist > mirrorlist && gist -u 3ac7c21617513627a906d314f63a7eca mirrorlist'

Just update /etc/pacman.d/mirrorlist:

$ pmr

Update and push to gist:

$ update-mirror

Run at Arch Linux installation:

$ curl -L https://git.io/JvPHm -o /etc/pacman.d/mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################
# With: reflector -c Indonesia -c Singapore -c US -c China --score 100 --latest 25 --sort rate --save /etc/pacman.d/mirrorlist --verbose
# When: 2020-03-25 18:49:12 UTC
# From: https://www.archlinux.org/mirrors/status/json/
# Retrieved: 2020-03-25 18:48:42 UTC
# Last Check: 2020-03-25 18:31:22 UTC
Server = http://mirror.sfo12.us.leaseweb.net/archlinux/$repo/os/$arch
Server = https://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch
Server = http://mirror.dal10.us.leaseweb.net/archlinux/$repo/os/$arch
Server = https://dfw.mirror.rackspace.com/archlinux/$repo/os/$arch
Server = https://iad.mirror.rackspace.com/archlinux/$repo/os/$arch
Server = http://mirror.mia11.us.leaseweb.net/archlinux/$repo/os/$arch
Server = https://arch.mirror.constant.com/$repo/os/$arch
Server = http://mirror.wdc1.us.leaseweb.net/archlinux/$repo/os/$arch
Server = http://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch
Server = http://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch
Server = http://ord.mirror.rackspace.com/archlinux/$repo/os/$arch
Server = http://arch.mirror.constant.com/$repo/os/$arch
Server = http://mirrors.rit.edu/archlinux/$repo/os/$arch
Server = http://iad.mirror.rackspace.com/archlinux/$repo/os/$arch
Server = https://mirrors.rit.edu/archlinux/$repo/os/$arch
Server = https://ord.mirror.rackspace.com/archlinux/$repo/os/$arch
Server = http://arch.mirrors.pair.com/$repo/os/$arch
Server = rsync://dfw.mirror.rackspace.com/archlinux/$repo/os/$arch
Server = rsync://ord.mirror.rackspace.com/archlinux/$repo/os/$arch
Server = rsync://arch.mirror.constant.com/archlinux/$repo/os/$arch
Server = https://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch
Server = rsync://arlm.tyzoid.com/archlinux/$repo/os/$arch
Server = rsync://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch
Server = rsync://mirrors.rit.edu/archlinux/$repo/os/$arch
Server = rsync://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment