19
Oct

Select another apt-mirror on Ubuntu Server

Once again I got annoyed because of the Austrian Ubuntu mirrors. They are really slow and that’s the point why I always choose the czech archive mirrors when getting asked.

Ok. This time I did not get asked but I felt it already when I did apt-get update. So, how to change it? It’s easy: Just replace all links in /etc/apt/sources.list with the links to the mirror you really want. But hey. I’m a developer. I don’t do this 2 or more times. Therefore I want a script and if there is no script, I write it. With sed, this was simple:

sudo sed -i -e 's/at\.archive\.ubuntu\.com/cz\.archive\.ubuntu\.com/g' /etc/apt/sources.list

That’s it. I wanted to install openjdk and when downloading it from at-mirror it said 1 hour 22 minutes remaining. Switched to cz-mirror and the installation was done after less than 2 minutes. It’s a shame.

There's 0 Comment So Far

Share your thoughts, leave a comment!