Skip to content

Instantly share code, notes, and snippets.

@KenEkanem
Created April 25, 2023 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KenEkanem/5d4b9846317708710ea8a605a545a8f8 to your computer and use it in GitHub Desktop.
Save KenEkanem/5d4b9846317708710ea8a605a545a8f8 to your computer and use it in GitHub Desktop.
Update mirrorlist in Arch linux using reflector

A "reflector" is a utility that helps users to find the fastest and most up-to-date mirrors for their system. Mirrors are servers that store copies of the Arch Linux packages and updates, which users can download and install on their own machines.

Installation

sudo pacman -S reflector

Usage

Default

reflector

Example 1

sudo reflector --verbose --sort rate -l 20 --save /etc/pacman.d/mirrorlist

Example 2

 sudo reflector --verbose --sort rate -l 20 --save /etc/pacman.d/mirrorlist

Example 3

 sudo reflector --verbose --sort rate -l 20 -c Netherlands -c France --save /etc/pacman.d/mirrorlist

Example 4

 sudo reflector --verbose --sort rate -l 15 -p https --save /etc/pacman.d/mirrorlist

Options

--verbose option will display more detailed output about what reflector is doing during the update process.

--sort rate option will sort the mirrors based on their download speed.

--save /etc/pacman.d/mirrorlist option saves the updated mirrorlist to the /etc/pacman.d/mirrorlist file.

-l 20 option limits the number of mirrors that will be included in the updated mirrorlist to 20

-c Netherlands -c France option filters the available mirrors based on their country of origin, in this case, only mirrors from Netherlands and France will be included in the updated mirrorlist.

-p https option specifies that only mirrors that support HTTPS protocol will be included in the updated mirrorlist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment