Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Friday, March 30, 2018 at 20:30


If you find your download is slow from a certain Ubuntu mirror, you can change your download source to another mirror. This change is usually necessary if your place is too far to the download source (or, if the network latency is too high). This article discusses how to do it with example from original server (in United States) to a mirror (in Indonesia). You may choose either one of two ways explained below. This is applicable for all Ubuntu versions including 18.04.

Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.

1. Automatic Way


The automatic way eases you by using click and run rather than command lines. In this example we will change the mirror from originally United States archive.ubuntu.com to Indonesia kartolo.sby.datautama.net.id.

First:

Open up your menu and run Software & Updates.



Second:

Change the selection of "Download from:" into Other.



Third:

From the small dialog appears, select kartolo.sby.datautama.net.id from the mirrors of Indonesia.



Last:

Press Reload button and let it say "Updating cache" meaning re-downloading the new mirror addresses.




2. Manual Way


In this example, we want to change the mirror from originally archive.ubuntu.com to Indonesia kambing.ui.ac.id (by University of Indonesia).

Know The Mirrors

List of Ubuntu mirrors available to you to use is available in https://launchpad.net/ubuntu/+archivemirrors.


Change URL Addresses

Change original URL addresses in /etc/apt/sources.list into the desired ones. The easiest way to do this is by using nano. Remember, in nano, Ctrl+O = save as, Ctrl+X = exit, and Ctrl+\ = find and replace.

  • $ sudo nano /etc/apt/sources.list  
  • Copy the http URL from University of Indonesia above
  • Change all URL from archive.ubuntu.com/ubuntu into the copied URL
  • See example below:

Before:



After:


Reload


The last, perform a reload command to re-download the new mirror addresses:
$ sudo apt-get update





This article is licensed under CC BY-SA 3.0.