banner
endercat

endercat

某个白嫖怪的分享博客 现已迁移到 https://endercat.eu.org 请前往该URL查看最新文章
bilibili
github
telegram

Change to a faster mirror source for Arch Linux or its derivatives more easily

If you are trying to install Arch Linux or its derivatives for the first time and are located in China, you may feel desperate due to the slow download speed of software sources. Within this vast country, network restrictions and limitations often cause significant trouble for the transmission of software packages. In such cases, your user experience is often very poor.
You can choose to change the mirror source, but searching on search engines like Baidu often leads to quite troublesome methods, and you usually cannot directly determine whether the mirror source is the fastest in your region.
Today, I will introduce a quick method

arch_chan_by_raviolimavioli_deiz9mv-pre


Prerequisites#

  • Ability to install software packages using pacman
  • Root privileges

Method#

  1. Install reflector using pacman
sudo pacman -S reflector
  1. Backup mirrorlist (optional)
sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
  1. Test the speed and save mirror sources
sudo reflector --verbose -c China --latest 12 --sort rate --threads 100 --save /etc/pacman.d/mirrorlist

This command means using the reflector tool to select 12 mirror sources from the Arch Linux mirror sites in China, sort by rate, use 100 threads for operation, and save the results to the /etc/pacman.d/mirrorlist file.
Of course, you can also modify the parameters yourself.
4. Refresh the software package list

sudo pacman -Syy

Now you should be able to download software packages at a faster speed. If errors occur during the download, you can retry the above steps.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.