Difference between revisions of "Pacman-mirrors"

Using -yy is bad practice
(Marked this version for translation)
(Using -yy is bad practice)
(17 intermediate revisions by 2 users not shown)
Line 12: Line 12:


=== Use === <!--T:4-->
=== Use === <!--T:4-->
For most functions, a working internet connection is required. From v4, Pacman-Mirrors will check if network is online. It is doing so by querying some generic websites. The sites are chosen due to their general avaiability.
For most functions, a working internet connection is required. From v4, Pacman-Mirrors will check if network is online. It is doing so by querying some generic websites. The sites are chosen due to their general avaiability. pacman-mirrors will selfupdate by downloading mirrors.json and status.json from repo.manjaro.org


<!--T:5-->
<!--T:5-->
# repo.manjaro.org
# wikipedia.org
# wikipedia.org
# github.com
# bitbucket.org
# bitbucket.org


Line 35: Line 35:


  <!--T:11-->
  <!--T:11-->
$ sudo pacman -Syyu
$ sudo pacman -Syu


<!--T:12-->
<!--T:12-->
Line 75: Line 75:


====Update mirrorlist with the fastest mirrors==== <!--T:23-->
====Update mirrorlist with the fastest mirrors==== <!--T:23-->
  sudo pacman-mirrors --fasttrack && sudo pacman -Syyu
  sudo pacman-mirrors --fasttrack && sudo pacman -Syu


====Limit to 5 mirrors==== <!--T:24-->
====Limit to 5 mirrors==== <!--T:24-->
An optional number can be supplied to limit the number of mirrors in the mirrorlist
An optional number can be supplied to limit the number of mirrors in the mirrorlist
  sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu
  sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syu


====Mirrors for your country only==== <!--T:25-->
====Mirrors for your country only==== <!--T:25-->
Not all countries have mirrors, if geoip returns a country not in the pool all mirrors will be used.
Not all countries have mirrors, if geoip returns a country not in the pool all mirrors will be used.
  sudo pacman-mirrors --geoip && sudo pacman -Syyu
  sudo pacman-mirrors --geoip && sudo pacman -Syu


===Commands customizing the mirror pool=== <!--T:26-->
===Commands customizing the mirror pool=== <!--T:26-->
Line 93: Line 93:
====Customize mirror pool by continent==== <!--T:28-->
====Customize mirror pool by continent==== <!--T:28-->
Create a custom mirror pool using mirrors from the continent determined by querying a geolocation service
Create a custom mirror pool using mirrors from the continent determined by querying a geolocation service
  sudo pacman-mirrors --continent && sudo pacman -Syyu
  sudo pacman-mirrors --continent && sudo pacman -Syu


====Customize mirror pool by countries==== <!--T:29-->
====Customize mirror pool by countries==== <!--T:29-->
Create a custom mirror pool using mirrors from Germany, France and Austria
Create a custom mirror pool using mirrors from Germany, France and Austria
  sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
  sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu


====Customize mirror pool by interactive selection==== <!--T:30-->
====Customize mirror pool by interactive selection==== <!--T:30-->
Create a custom mirror pool using the '''--default''' mirror pool '''--interactive''' will list all available mirrors and procotols in a gui windows allowing to sort the columns and interactively select according to your preferences.
Create a custom mirror pool using the '''--default''' mirror pool '''--interactive''' will list all available mirrors and procotols in a gui windows allowing to sort the columns and interactively select according to your preferences.
  sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
  sudo pacman-mirrors --interactive --default && sudo pacman -Syu


====Use specific protocols (prioritized)==== <!--T:31-->
====Use specific protocols (prioritized)==== <!--T:31-->
Rank the current mirror pool using only https and http protocol
Rank the current mirror pool using only https and http protocol
  sudo pacman-mirrors --api --protocol https,http && sudo pacman -Syyu
  sudo pacman-mirrors --api --protocol https,http && sudo pacman -Syu


====Switch branch to unstable and use German mirrors==== <!--T:32-->
====Switch branch to unstable and use German mirrors==== <!--T:32-->
Change the system branch to unstable and create a custom mirror pool using mirrors from Germany
Change the system branch to unstable and create a custom mirror pool using mirrors from Germany
  sudo pacman-mirrors --country Germany --api --set-branch unstable && sudo pacman -Syyu
  sudo pacman-mirrors --country Germany --api --set-branch unstable && sudo pacman -Syu


==== Switch branch and use German mirrors with https==== <!--T:33-->
==== Switch branch and use German mirrors with https==== <!--T:33-->
Change the system branch to unstable, set configuration to use https only and create a custom mirror pool using mirrors from Germany
Change the system branch to unstable, set configuration to use https only and create a custom mirror pool using mirrors from Germany
  sudo pacman-mirrors --country Germany --api --set-branch unstable --protocol https && sudo pacman -Syyu
  sudo pacman-mirrors --country Germany --api --set-branch unstable --protocol https && sudo pacman -Syu


===Reset=== <!--T:34-->
===Reset=== <!--T:34-->
Line 119: Line 119:


  <!--T:35-->
  <!--T:35-->
sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu
sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syu


==Overview== <!--T:36-->
==Overview== <!--T:36-->
Line 1,987: Line 1,987:


  <!--T:73-->
  <!--T:73-->
$ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
$ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu


<!--T:74-->
<!--T:74-->
Line 1,993: Line 1,993:


  <!--T:75-->
  <!--T:75-->
$ sudo pacman-mirrors --country Antarctica && sudo pacman -Syyu
$ sudo pacman-mirrors --country Antarctica && sudo pacman -Syu
  .: Info Downloading mirrors from repo.manjaro.org
  .: Info Downloading mirrors from repo.manjaro.org
  .: Warning Option '-c/--country' : unknown country: 'Antarctica'
  .: Warning Option '-c/--country' : unknown country: 'Antarctica'
Line 2,006: Line 2,006:
<!--T:76-->
<!--T:76-->
Another option for the mirrors closest to your location is '''--geoip'''
Another option for the mirrors closest to your location is '''--geoip'''
<pre>$ sudo pacman-mirrors --geoip --quiet && sudo pacman -Syyu
<pre>$ sudo pacman-mirrors --geoip --quiet && sudo pacman -Syu
:: Querying servers, this may take some time
:: Querying servers, this may take some time
=> Testing mirrors in France
=> Testing mirrors in France
Line 2,024: Line 2,024:
<!--T:80-->
<!--T:80-->
'''First option''' is using ''--interactive''. It uses your current mirror pool(whether default or custom)
'''First option''' is using ''--interactive''. It uses your current mirror pool(whether default or custom)
  $ sudo pacman-mirrors --interactive && sudo pacman -Syyu
  $ sudo pacman-mirrors --interactive && sudo pacman -Syu


<!--T:81-->
<!--T:81-->
'''Second option''' is using ''--interactive --default''. This force the use of the official mirror pool
'''Second option''' is using ''--interactive --default''. This force the use of the official mirror pool
  $ sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
  $ sudo pacman-mirrors --interactive --default && sudo pacman -Syu


<!--T:82-->
<!--T:82-->
'''Third option''' is supplying a list of countries with ''--country''. The countries is an example - check the country list if in doubt.
'''Third option''' is supplying a list of countries with ''--country''. The countries is an example - check the country list if in doubt.
  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
  $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu


<!--T:83-->
<!--T:83-->
Line 2,051: Line 2,051:


  <!--T:88-->
  <!--T:88-->
$ sudo pacman-mirrors --country all && sudo pacman -Syyu
$ sudo pacman-mirrors --country all && sudo pacman -Syu


<!--T:89-->
<!--T:89-->
Line 2,057: Line 2,057:


  <!--T:90-->
  <!--T:90-->
$ sudo pacman-mirrors --interactive --default && sudo pacman -Syyu
$ sudo pacman-mirrors --interactive --default && sudo pacman -Syu
* You will be presented with a list with all and every mirror and you can pick your selection.
* You will be presented with a list with all and every mirror and you can pick your selection.


Line 2,063: Line 2,063:
'''Third option''' is to supply a list of countries and use those for a custom mirror pool.
'''Third option''' is to supply a list of countries and use those for a custom mirror pool.
The countries is an example - check the country list if in doubt.
The countries is an example - check the country list if in doubt.
   $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syyu
   $ sudo pacman-mirrors --country Germany,France,Austria && sudo pacman -Syu
* If you supply the same preferred countries on every reset you will get your mirror pool updated with added or removed mirrors.
* If you supply the same preferred countries on every reset you will get your mirror pool updated with added or removed mirrors.


Line 2,070: Line 2,070:


=== Apply pacman-mirrors defaults === <!--T:93-->
=== Apply pacman-mirrors defaults === <!--T:93-->
  sudo pacman-mirrors --country all --api --protocol all -set-branch stable && sudo pacman -Syyu
  sudo pacman-mirrors --country all --api --protocol all -set-branch stable && sudo pacman -Syu


<!--T:94-->
<!--T:94-->
48

edits