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
Prerequisites#
- Ability to install software packages using
pacman
- Root privileges
Method#
- Install
reflector
usingpacman
sudo pacman -S reflector
- Backup
mirrorlist
(optional)
sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
- 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.