美文网首页Arch之道
archlinux自动选择网速较快的源

archlinux自动选择网速较快的源

作者: _narcissus | 来源:发表于2019-05-04 17:47 被阅读0次

archlinux自动选择网速较快的源

什么是reflector

Reflector is a script which can retrieve the latest mirror list from the MirrorStatus page, filter the most up-to-date mirrors, sort them by speed and overwrite the file /etc/pacman.d/mirrorlist.

安装reflector脚本

sudo pacman -S reflector

命令运行

首先备份之前的mirrorlist

sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup

选择https/http协议、位于中国、12小时同步的镜像,通过下载速度排序,写入到 /etc/pacman.d/mirrorlist:

sudo reflector --verbose --country China --age 12 --protocol https --protocol http --sort rate --save /etc/pacman.d/mirrorlist

相关文章

网友评论

    本文标题:archlinux自动选择网速较快的源

    本文链接:https://www.haomeiwen.com/subject/ylkfoqtx.html