← 返回命令列表

Linux command

reflector 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

sudo reflector --sort rate --save /etc/pacman.d/mirrorlist

Example

reflector -c [Germany] -p https

Example

reflector -l [10]

Example

sudo reflector @/etc/xdg/reflector/reflector.conf

Example

reflector -h

说明

reflector retrieves and filters the latest Arch Linux mirrorlist. It can test mirror speed and sort by various criteria, then save an optimized mirrorlist for pacman. The tool is useful for finding fast, reliable mirrors for your location. It can be run periodically via systemd timer to keep the mirrorlist current.

参数

-c, --country _country_
Filter by country
-p, --protocol _proto_
Filter by protocol (http, https, ftp)
-l, --latest _num_
Get N most recently synced mirrors
--sort _method_
Sort by: rate, country, score, delay
--save _file_
Save output to file
--age _hours_
Only mirrors synced within N hours
-f, --fastest _num_
Return N fastest mirrors

FAQ

What is the reflector command used for?

reflector retrieves and filters the latest Arch Linux mirrorlist. It can test mirror speed and sort by various criteria, then save an optimized mirrorlist for pacman. The tool is useful for finding fast, reliable mirrors for your location. It can be run periodically via systemd timer to keep the mirrorlist current.

How do I run a basic reflector example?

Run `sudo reflector --sort rate --save /etc/pacman.d/mirrorlist` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c, --country _country_ do in reflector?

Filter by country