Reflector is a tool that checks the most recently upgraded Arch Linux mirrors and ranks them by speed and saves them to your mirrorlist.
sudo pacman --needed -S reflector rsync curl cd /etc/systemd/system/ sudo curl -LO https://github.com/Mikaela/shell-things/raw/master/etc/systemd/system/reflector.service sudo systemctl enable reflector sudo systemctl start reflector sudo pacman -Syu
(end of TL;DR and what you actually do)
- Install reflector itself, additional depedency of rsync to rank the mirrors by speed, and curl which you use in the second command
- to download my reflector.service
- differences to Arch Wiki version: requires network-online.target so you don’t have to enable any wait-online services and uses only https mirrors.
- enable the service so it’s ran on boot
- start it now so it checks the most recently updated mirrors and saves them to mirrorlist.
- Check for updates & install them.
Do check the service itself at https://github.com/Mikaela/shell-things/raw/master/etc/systemd/system/reflector.service !
/etc/pacman.conf and add the line:
NoExtract = etc/pacman.d/mirrorlist
so when you upgrade you won’t get useless mirrorlist.pacnew file. NOTE:
it’s intented to be
etc/pacman.d/mirrorlist without the initial
because it’s relative, not absolute, path.