Ubuntu mirrors

Ah juzo-kun, your Linux-tans have become the stuff of legend!

Today I needed to change apt sources on an Ubuntu server to point somewhere else, on account of an awry default mirror. Since Lucid, Ubuntu has supported the mirror method:

## /etc/apt/sources.list for Ubuntu 14.04 LTS
## Using mirror.txt pool for geographically-close servers

deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse
Github Gist

I was entirely unaware mirror had its own protocol! I’ll bet it’s reflective. Jokes aside, I swapped out my local mirror for these text files, and low and behold I was pulling packages from Optus. Half a day later, and it was iiNet.

Downloading the file directly (with http, not mirrors) resulted in this list:


http://mirror.optus.net/ubuntu/


http://ubuntu.mirror.serversaustralia.com.au/ubuntu/


http://mirror.netspace.net.au/pub/ubuntu/


http://ftp.iinet.net.au/pub/ubuntu/


http://mirror.overthewire.com.au/ubuntu/


http://ubuntu.mirror.crucial.com.au/


http://mirror.as24220.net/pub/ubuntu-archive/


http://mirror.internode.on.net/pub/ubuntu/ubuntu/


http://ubuntu.mirror.uber.com.au/archive/


http://mirror.as24220.net/pub/ubuntu/


http://mirror.aarnet.edu.au/pub/ubuntu/archive/


http://mirror.waia.asn.au/ubuntu/


http://archive.ubuntu.com/ubuntu/

Github Gist

An interesting approach. Rather than hitting the same repo each time, we’re given a pool of alternative, geographically-close servers.

Both Debian and FreeBSD take a different approach to this with redirectors. Depending on where you hit pkg.freebsd.org or http.debian.org from, you’re directed to a different server.


Imprint

This is one of about 5000 posts on Rubénerd. View the home page for the latest, or related posts also tagged with:

If you liked this post, feel free to buy me a coffee, leave me a comment on Twitter, or email me at weblog2017@rubenschade.com. Thanks :).