When you hover your mouse over the code he posted there will be an paper icon in it’s top right.
Click that to copy it to your clipboard, next paste it in a terminal and press enter to execute it…
On each machine you want to use different DNS’s on, you need to manually set those that were the fastest.
Because it’s a local override of the DNS setting per machine…
In my case i see this:
> for domain in manjaro.org duckduckgo.com bbc.co.uk; do google_dns=$(dig @8.8.8.8 ${domain} | awk '/msec/{print $4}'); cloudflare_dns=$(dig @1.1.1.1 ${domain} | awk '/msec/{print $4}'); printf "${domain}\tCloudFlare DNS ${cloudflare_dns}ms\tGoogle DNS ${google_dns}ms\n"; done
manjaro.org CloudFlare DNS 63ms Google DNS 66ms
duckduckgo.com CloudFlare DNS 66ms Google DNS 39ms
bbc.co.uk CloudFlare DNS 66ms Google DNS 69ms
(In my personal setup i use my own DNS server on my own machine, so i don’t use either lol)
$ for domain in manjaro.orgduckduckgo.combbc.co.uk
; do google_dns=$(dig @8.8.8.8 ${domain} | awk ‘/msec/{print $4}’); cloudflare_dns=$(dig @1.1.1.1
${domain} | awk ‘/msec/{print $4}’); printf “${domain}\tCloudFlare DNS ${cloudflare_dns}ms\tGoog
le DNS ${google_dns}ms\n”; done
bash: dig: command not found
bash: dig: command not found manjaro.org CloudFlare DNS ms Google DNS ms
bash: dig: command not found
bash: dig: command not found duckduckgo.com CloudFlare DNS ms Google DNS ms
bash: dig: command not found
bash: dig: command not found bbc.co.uk CloudFlare DNS ms Google DNS ms
dig is provided by the bind package.
Sorry for not mentioning it … I forget it not installed by default.
So just install bind and run the command again.
(and darn … again me annoyed I dont have the old command … it was easier to expand and used little curl touches so no extra install needed)
the command failed because you dont have the application dig which is what queries the servers. the application is provided by the package bind … if you install bind and run the command again it will work.
It’s the place all your software of manjaro is coming from…
Just execute the command, that cscs just gave, in a terminal: pamac install bind
it will add the dig and host commands to your system…
$ for domain in manjaro.orgduckduckgo.combbc.co.
uk; do google_dns=$(dig @8.8.8.8 ${domain} | awk ‘/msec/{print $4}’); cloudflare_dns=$(dig @1.1.1
.1 ${domain} | awk ‘/msec/{print $4}’); printf “${domain}\tCloudFlare DNS ${cloudflare_dns}ms\tGo
ogle DNS ${google_dns}ms\n”; done
bash: syntax error near unexpected token `do’
[roblovesjosie@rob-tufgamingfa506iifx506ii ~]$ bash: dig: command not found
bash: bash:: command not found
[roblovesjosie@rob-tufgamingfa506iifx506ii ~]$ bash: dig: command not found
bash: bash:: command not found
[roblovesjosie@rob-tufgamingfa506iifx506ii ~]$ manjaro.org CloudFlare DNS ms Google DNS
ms
bash: manjaro.org: command not found
[roblovesjosie@rob-tufgamingfa506iifx506ii ~]$ bash: dig: command not found
bash: bash:: command not found
[roblovesjosie@rob-tufgamingfa506iifx506ii ~]$ bash: dig: command not found
bash: bash:: command not found
[roblovesjosie@rob-tufgamingfa506iifx506ii ~]$ duckduckgo.com CloudFlare DNS ms Google DNS
ms
bash: duckduckgo.com: command not found
[roblovesjosie@rob-tufgamingfa506iifx506ii ~]$ bash: dig: command not found
bash: bash:: command not found
[roblovesjosie@rob-tufgamingfa506iifx506ii ~]$ bash: dig: command not found
bash: bash:: command not found
[roblovesjosie@rob-tufgamingfa506iifx506ii ~]$ bbc.co.uk CloudFlare DNS ms Google DNS
ms
bash: bbc.co.uk: command not found