{"id":25588,"date":"2024-02-29T14:16:29","date_gmt":"2024-02-29T14:16:29","guid":{"rendered":"https:\/\/linuxways.net\/?p=25588"},"modified":"2024-02-29T14:20:34","modified_gmt":"2024-02-29T14:20:34","slug":"installuse-reflector-arch-linux","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/arch\/installuse-reflector-arch-linux\/","title":{"rendered":"How To Install and Use Reflector on Arch Linux"},"content":{"rendered":"<p>On Arch Linux applications are installed in packages through package installers that are compatible with it. Mirrors are used to organize and manage these packages on Arch and other Linux distributions. Mirrors are primarily the servers distributed across different countries that host similar copies of all the packages for a specific Linux distribution. Further, to automate the process of fetching mirror lists, a Python-based utility named reflector.<\/p>\n<p><strong>Outline:<\/strong><\/p>\n<ul>\n<li><a href=\"#post-25588-_fic9ekkcf5qn\"><strong>How To Install Reflector on Arch Linux<\/strong><\/a><\/li>\n<li><a href=\"#post-25588-_putdgt561fal\"><strong>How To Use Reflector on Arch Linux<\/strong><\/a><\/li>\n<li><a href=\"#post-25588-_41cd2kmuemwx\"><strong>Conclusion<\/strong><\/a><\/li>\n<\/ul>\n<h2><a id=\"post-25588-_fic9ekkcf5qn\"><\/a><strong>How To Install Reflector on Arch Linux<\/strong><\/h2>\n<p>On Arch Linux, when a package installation command is executed via Pacman it fetches packages from the mirrors (servers that host software repositories). The reflector tool helps in finding the fastest and up-to-date mirrors for Arch Linux package repositories, to install the reflector tool on Arch execute:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> pacman <span class=\"re5\">-S<\/span> reflector rsync curl<\/div><\/div>\n<p>Here in the above command, I have also installed two utilities as well one is rsync which provides additional flexibility for system maintenance. The other one is curl which assists the reflector in fetching mirror data.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"370\" class=\"wp-image-25600\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-1.png 635w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-1-300x175.png 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<p>Once the installation is completed, you can verify it by executing:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> pacman <span class=\"re5\">-Qi<\/span> reflector<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"319\" class=\"wp-image-25603\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-2.png 633w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-2-300x151.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/p>\n<h2><a id=\"post-25588-_putdgt561fal\"><\/a><strong>How To Use Reflector on Arch Linux <\/strong><\/h2>\n<p>A reflector in Arch serves various purposes which include fetching the mirror list, filtering and sorting mirrors based on given preferences, and overwriting the mirror list. Using a reflector makes it easy to maintain mirror lists and here are the tasks that can be performed by using a reflector on Arch:<\/p>\n<h3><a id=\"post-25588-_yl4n7814ch1e\"><\/a><strong>1: List of Mirrors For Arch Linux<\/strong><\/h3>\n<p>The mirror list is placed in the Arch default package installer directory, so instead of navigating to that directory simply execute the reflector command and it will list all the mirrors:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">reflector<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"638\" height=\"392\" class=\"wp-image-25607\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-3.png 638w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-3-300x184.png 300w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><\/p>\n<p>Since the mirror list is quite long, so multiple filters can be used to list the mirrors, for instance, if you want to list the mirrors that are new use the age option:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">reflector <span class=\"re5\">--sort<\/span> age<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"364\" class=\"wp-image-25612\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-4.png 635w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-4-300x172.png 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<p>Similarly, to list down mirrors based on the download rate use the rate option, here verbose is used to make the output more explicit:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">reflector <span class=\"re5\">--sort<\/span> rate <span class=\"re5\">--verbose<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1391\" height=\"274\" class=\"wp-image-25617\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-5.png 1391w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-5-300x59.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-5-1024x202.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-5-768x151.png 768w\" sizes=\"auto, (max-width: 1391px) 100vw, 1391px\" \/><\/p>\n<p>Furthermore, to list the mirrors based on the protocols use the p flag and give your preferred protocol like https, http or rsync:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">reflector <span class=\"re5\">-p<\/span> <span class=\"sy0\">&lt;<\/span>protocol<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"669\" height=\"290\" class=\"wp-image-25624\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-6.png 669w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-6-300x130.png 300w\" sizes=\"auto, (max-width: 669px) 100vw, 669px\" \/><\/p>\n<p>Lastly, you can narrow down the list to only a set of the latest mirrors or servers using the l flag along with the number of mirrors you need:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">reflector <span class=\"re5\">-l<\/span> <span class=\"sy0\">&lt;<\/span>number-of-mirrors<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"661\" height=\"345\" class=\"wp-image-25632\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-7.png 661w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-7-300x157.png 300w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/p>\n<h3><a id=\"post-25588-_s8hpgogudpjl\"><\/a><strong>2: Setting up a Desired Server on Arch<\/strong><\/h3>\n<p>As mentioned above mirrors are distributed across the globe, so there are servers for different countries which can be set based on the user preference. However, before changing the server location it is necessary to first create a backup file for the mirror list, so for that navigate to pacman.d directory:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">cd<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>pacman.d<span class=\"sy0\">\/<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"666\" height=\"183\" class=\"wp-image-25642\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-8.png 666w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-8-300x82.png 300w\" sizes=\"auto, (max-width: 666px) 100vw, 666px\" \/><\/p>\n<p>Now create a copy for the exiting mirror list and name it with .bak extension:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">cp<\/span> mirrorlist mirrorlist.bak<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"180\" class=\"wp-image-25650\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-9.png 635w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-9-300x85.png 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<p>Now use the c flag for country, p for preferred protocol, sort for filtering the list and save flag for saving the new list in the mirror list:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> reflector <span class=\"re5\">-c<\/span> Australia <span class=\"re5\">-c<\/span> Austria <span class=\"re5\">-a<\/span> <span class=\"nu0\">12<\/span> <span class=\"re5\">-p<\/span> https <span class=\"re5\">-p<\/span> http <span class=\"re5\">--sort<\/span> rate <span class=\"re5\">--save<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>pacman.d<span class=\"sy0\">\/<\/span>mirrorlist<\/div><\/div>\n<p>Here I have used the countries Australia and Austria just for demonstration, you can choose any other as well. Moreover, here I have sorted the list based on the download rate and limited the number of mirrors to 12:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"644\" height=\"276\" class=\"wp-image-25663\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-10.png 644w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-10-300x129.png 300w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/p>\n<p>After modifying the mirror list you can verify the changes by reading the mirror list file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">cat<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>pacman.d<span class=\"sy0\">\/<\/span>mirrorlist<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"639\" height=\"370\" class=\"wp-image-25672\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-11.png 639w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-11-300x174.png 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/p>\n<p>Here, as in the image above, you can see that the mirror list is updated by executing the same command that was executed earlier.<\/p>\n<p><strong>Note:<\/strong> You might see warnings for downloads while setting up the mirror list according to your preferences, but there is nothing to worry about. This is because of the timeout for the server links, to avoid that you can increase the number of mirrors that is the higher the number the better the result.<\/p>\n<h3><a id=\"post-25588-_5mpyeh6zf8un\"><\/a><strong>3: Saving the Latest Mirrors Based on User Parameters <\/strong><\/h3>\n<p>Mirror lists other than the country or location can also be updated, for instance, you can list a certain number of mirrors based on the rate and their recent update. To demonstrate, I have listed only the three latest mirrors and saved them in the mirror list file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> reflector <span class=\"re5\">--verbose<\/span> <span class=\"re5\">--sort<\/span> rate <span class=\"re5\">-l<\/span> <span class=\"nu0\">3<\/span> <span class=\"re5\">--save<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>pacman.d<span class=\"sy0\">\/<\/span>mirrorlist<\/div><\/div>\n<p>Here, to get a better result by increasing the number of mirrors, I have listed only 3 for demonstration purposes<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"280\" class=\"wp-image-25681\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-12.png 801w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-12-300x105.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-12-768x268.png 768w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><\/p>\n<p>Once you have saved the desired mirror list on Arch then verify it by reading the mirror list file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">cat<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>pacman.d<span class=\"sy0\">\/<\/span>mirrorlist<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"679\" height=\"313\" class=\"wp-image-25687\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-13.png 679w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-13-300x138.png 300w\" sizes=\"auto, (max-width: 679px) 100vw, 679px\" \/><\/p>\n<p>As in the image above, it can be seen that the three mirrors are in the list updated by the command executed above.<\/p>\n<h3><a id=\"post-25588-_nq045brl0sbr\"><\/a><strong>4: Setting up Reflector Service<\/strong><\/h3>\n<p>To keep the mirror list updated automatically you need to create a service for the reflector, which is already present but needs to be activated so navigate to the system directory in systemd:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">cd<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>systemd<span class=\"sy0\">\/<\/span>system<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"206\" class=\"wp-image-25694\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-14.png 682w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-14-300x91.png 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/p>\n<p>Now create a reflector service file using any file editor on Arch Linux:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">nano<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>systemd<span class=\"sy0\">\/<\/span>system<span class=\"sy0\">\/<\/span>reflector.service<\/div><\/div>\n<p>Now copy the code lines given below in the reflector service file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"br0\">&#91;<\/span>Unit<span class=\"br0\">&#93;<\/span><br \/>\n<br \/>\n<span class=\"re2\">Description<\/span>=Pacman mirrorlist update<br \/>\n<br \/>\n<span class=\"re2\">Wants<\/span>=network-online.target<br \/>\n<br \/>\n<span class=\"re2\">After<\/span>=network-online.target<br \/>\n<br \/>\n<span class=\"br0\">&#91;<\/span>Service<span class=\"br0\">&#93;<\/span><br \/>\n<br \/>\n<span class=\"re2\">Type<\/span>=oneshot<br \/>\n<br \/>\n<span class=\"re2\">ExecStart<\/span>=<span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span>reflector <span class=\"re5\">-c<\/span> Taiwan <span class=\"re5\">-c<\/span> Thailand <span class=\"re5\">-a<\/span> <span class=\"nu0\">12<\/span> <span class=\"re5\">-p<\/span> https <span class=\"re5\">-p<\/span> http <span class=\"re5\">--sort<\/span> rate <span class=\"re5\">--save<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>pacman.d<span class=\"sy0\">\/<\/span>mirrorlist<br \/>\n<br \/>\n<span class=\"br0\">&#91;<\/span>Install<span class=\"br0\">&#93;<\/span><br \/>\n<br \/>\n<span class=\"re2\">RequiredBy<\/span>=multi-user.target<\/div><\/div>\n<p>Here, the code is devised in three sections one is the unit which contains the information about what the unit does and specifies that the unit depends on network availability.<\/p>\n<p>The service section comes with filtering options for mirrors, I have downloaded the 12 mirrors for Taiwan and Thailand sorted based on the download rate. You can write the command for saving the mirror list by sporting it out based on your preferences.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"303\" class=\"wp-image-25700\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-15.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-15.png 737w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-15-300x123.png 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/p>\n<p>Now simply start the reflector service so that the mirror list is updated according to the given instructions:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> systemctl start reflector.service<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"634\" height=\"191\" class=\"wp-image-25705\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-16.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-16.png 634w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-16-300x90.png 300w\" sizes=\"auto, (max-width: 634px) 100vw, 634px\" \/><\/p>\n<p>Now verify the mirror list if it is updated according to the given filters:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">cat<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>pacman.d<span class=\"sy0\">\/<\/span>mirrorlist<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"367\" class=\"wp-image-25711\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-17.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-17.png 731w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-17-300x151.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p>It is to be noted that whenever you make any changes in the reflector service file reload the daemon service so that these changes are applied successfully:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> systemctl daemon-reload<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"133\" class=\"wp-image-25716\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-18.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-18.png 729w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-18-300x55.png 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/p>\n<h3><a id=\"post-25588-_e3tknfwekl9w\"><\/a><strong>5: Setting a Reflector Timer on Arch <\/strong><\/h3>\n<p>Using the reflector timer service on Arch the mirror list can be updated based on any specific time so for that create a time file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">nano<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>systemd<span class=\"sy0\">\/<\/span>system<span class=\"sy0\">\/<\/span>reflector.timer<\/div><\/div>\n<p>Now paste the set of instructions given below in the timer file, Here I have set the time to 7 AM on every Monday, you can set the day and time as desired. Next, I set the random delay of 15 hours before the timer actually starts and afterward set it to be persistent across the system restart. Further, the last code line ensures that the timer will be started once the system is started:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"br0\">&#91;<\/span>Unit<span class=\"br0\">&#93;<\/span><br \/>\n<br \/>\n<span class=\"re2\">Description<\/span>=Reflector weekly timer<br \/>\n<br \/>\n<span class=\"br0\">&#91;<\/span>Timer<span class=\"br0\">&#93;<\/span><br \/>\n<br \/>\n<span class=\"re2\">OnCalendar<\/span>=Mon \u22c6-\u22c6-\u22c6 <span class=\"nu0\">7<\/span>:00:00<br \/>\n<br \/>\n<span class=\"re2\">RandomizeDelaySec<\/span>=<span class=\"nu0\">15<\/span> h<br \/>\n<br \/>\n<span class=\"re2\">Persistent<\/span>=<span class=\"kw2\">true<\/span><br \/>\n<br \/>\n<span class=\"br0\">&#91;<\/span>Install<span class=\"br0\">&#93;<\/span><br \/>\n<br \/>\n<span class=\"re2\">WantedBy<\/span>=timers.target<\/div><\/div>\n<p>Now save the timer service file and then to make it active start the timer service:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> systemctl start reflector.timer<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"626\" height=\"367\" class=\"wp-image-25723\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-19.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-19.png 626w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-19-300x176.png 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/p>\n<p>Further, if you need help regarding the use of a reflector on Arch consult its command help by executing:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">reflector <span class=\"re5\">--help<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"663\" height=\"371\" class=\"wp-image-25728\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-20.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-20.png 663w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/02\/word-image-25588-20-300x168.png 300w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/p>\n<h2><a id=\"post-25588-_41cd2kmuemwx\"><\/a><strong>Conclusion<\/strong><\/h2>\n<p>Reflectors in Arch Linux are primarily used to update and organize the mirrors that are responsible for fetching the packages when installing any application via Pacman. Reflector on Arch Linux can be installed through its default package installer. It provides various options for sorting the mirrors which include age, download rate, protocols, country, and the newly updated.<\/p>","protected":false},"excerpt":{"rendered":"<p>Reflector on Arch Linux can be installed through its default package installer. It provides various options for sorting the mirrors.<\/p>","protected":false},"author":113,"featured_media":25822,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1055],"tags":[],"class_list":["post-25588","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arch"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/25588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=25588"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/25588\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/25822"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=25588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=25588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=25588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}