banner
endercat

endercat

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

Easily replace faster mirror sources for Arch Linux or its derivatives

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

arch_chan_by_raviolimavioli_deiz9mv-pre


Prerequisites#

  • You can use pacman to install software packages.
  • You have root privileges.

Method#

  1. Install reflector using pacman.
sudo pacman -S reflector
  1. Backup the mirrorlist (optional).
sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
  1. Test the speed and save the 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, perform the operation using 100 threads, and save the results to the file /etc/pacman.d/mirrorlist.
Of course, you can also modify the parameters yourself.
4. Refresh the package list.

sudo pacman -Syy

Now you should be able to download software packages at a faster speed. If there are any errors during the download, you can retry the above operations.

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