Skip to content

Instantly share code, notes, and snippets.

@oguzkaganeren
Forked from 2KAbhishek/mirrorlist.sh
Created August 15, 2024 19:36
Show Gist options
  • Save oguzkaganeren/72597b04af44bc2a681f83b968c539a0 to your computer and use it in GitHub Desktop.
Save oguzkaganeren/72597b04af44bc2a681f83b968c539a0 to your computer and use it in GitHub Desktop.
Generate fastest mirrors for Arch linux
#!/bin/bash
# Install reflector
sudo pacman -S reflector
# Update mirrorlist
reflector | sudo tee /etc/pacman.d/mirrorlist
@oguzkaganeren
Copy link
Author

sudo nano /etc/xdg/reflector/reflector.conf

# Recommended Options

# Set the output path where the mirrorlist will be saved (--save).
--save /etc/pacman.d/mirrorlist

# Select the transfer protocol (--protocol).
--protocol https

# Select the country (--country).
# Consult the list of available countries with "reflector --list-countries" and
# select the countries nearest to you or the ones that you trust. For example:
--country Germany,

# Use only the  most recently synchronized mirrors (--latest).
--latest 5

# Sort the mirrors by synchronization time (--sort).
--sort age

sudo systemctl enable reflector.service

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