📅  最后修改于: 2023-12-03 15:32:48.603000             🧑  作者: Mango
Manjaro is an open-source Linux distribution based on Arch Linux. One of the important parts of a Linux distribution is its software repository. In Manjaro, users can choose their preferred mirror for downloading and updating packages. The mirrolist
command in the shell/bash is used to manage and set the preferred mirror list for Manjaro.
The mirrolist
command is pre-installed in Manjaro. If you don't have it, you can install it using the following command:
sudo pacman -S pacman-mirrorlist
The mirrolist
command can be used to update the mirror list. Here's how:
sudo pacman-mirrors -f && sudo pacman -Syyu
This command will fetch the latest mirror list and update the package database.
To set the preferred mirror, use the rankmirrors
command in the following way:
sudo rankmirrors -n 6 /etc/pacman.d/mirrorlist > /etc/pacman.d/mirrorlist.new && sudo mv /etc/pacman.d/mirrorlist.new /etc/pacman.d/mirrorlist
This command will rank the mirrors based on their response time and set the top 6 as preferred mirrors.
To customize the mirror list, edit the /etc/pacman.d/mirrorlist
file and add/remove the mirrors as needed.
The mirrolist
command is an important tool for Manjaro users to manage their preferred mirrors. With this command, users can ensure their packages are downloaded quickly and securely.