• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

rankmirrors Command Examples in Linux

by Deepika

“rankmirrors” is a command-line tool in Arch Linux that helps to rank a list of Pacman mirrors based on their connection and opening speed. Pacman is the package manager used in Arch Linux to install and manage software packages.

When you run the “rankmirrors” command, it accesses each mirror in the current mirrorlist and performs a series of tests to measure the connection and opening speed of each mirror. The tests include measuring the response time of the mirror, the time it takes to download a small file, and the time it takes to download a larger file.

Based on the results of these tests, “rankmirrors” calculates a score for each mirror, with mirrors that perform better receiving a higher score. The tool then generates a new mirrorlist, with the mirrors ranked in order of their scores.

The “rankmirrors” command can be useful if you are experiencing slow download speeds or connection issues when using Pacman. By using the tool to generate a new mirrorlist, you can ensure that Pacman is using the fastest and most reliable mirrors for downloading packages.

rankmirrors Command Examples

1. Rank a mirror list:

# rankmirrors /etc/pacman.d/mirrorlist

2. Output only a given number of the top ranking servers:

# rankmirrors -n number /etc/pacman.d/mirrorlist

3. Be verbose when generating the mirrorlist:

# rankmirrors -v /etc/pacman.d/mirrorlist

4. Test only a specific URL:

# rankmirrors --url url

5. Output only the response times instead of a full mirrorlist:

# rankmirrors --times /etc/pacman.d/mirrorlist

For more information on “rankmirrors” and how to use it, you can refer to the Arch Linux wiki page on mirrors: https://wiki.archlinux.org/index.php/mirrors.

Filed Under: Linux

Some more articles you might also be interested in …

  1. gnome-terminal Command Examples in Linux
  2. ubuntu-drivers: command not found
  3. Sample /etc/multipath.conf file
  4. Starting iptables Fails with Error “Another app is currently holding the xtables lock”
  5. pidof Command Examples in Linux
  6. /var/log/chrony Directory Empty in CentOS/RHEL
  7. sensible-editor: command not found
  8. cradle package: Manage packages for a Cradle instance
  9. readelf Command Examples in Linux
  10. UbuntuDDE new upcoming Linux distribution

You May Also Like

Primary Sidebar

Recent Posts

  • diffstat: Create a histogram from the output of the diff command
  • diffoscope: Compare files, archives, and directories
  • diff-pdf: Tool for comparing two PDFs
  • dict: Command line dictionary using the DICT protocol

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright