How To Change Ubuntu Repository to Local Mirror? - Fosslicious

Thursday, August 16, 2018

How To Change Ubuntu Repository to Local Mirror?

How To Change Ubuntu Repository to Local Mirror?
Image by Pixabay
On Linux, there are many available repositories. There are many countries that have local mirrors provided for various Linux distributions, including the country where I live.

Changing the default Ubuntu or Linux distributions repository to the local mirror aims to speed up the connection when installing packages or updating. Besides that, the function of a mirror site is to reduce data traffic on one server.

From the experience that I got, it was faster when using local mirrors in accordance with the location of the residence rather than directly from the central server that was located not in my country.

There are several ways that you can use to change the Ubuntu repository address to the local mirror that I wrote below!

1. Using Software & Updates (GUI)
Please open Software & Updates/Software sources(can be searched using the search field, or Application finder) -> and please change with the local server on the Ubuntu Software Menu, in the Download from.


Change Ubuntu Repository to Local Mirror

There are so many server choices that you can choose, and please look for the server from the country where you live now.

2. Using Text Mode via the terminal
You can change the repository address to the local mirror directly by editing the file using the text editor via the terminal. Please follow the steps below.

Open terminal -> please type sudo nano /etc/apt/sources.list. Then it will look like this:

change repository using text app

Please edit the web address with the local web mirror address that matches your place of residence. Besides using nano, you can use other text editors such as Gedit, Mousepad, etc. Don't forget to save the settings that you changed. Both this methods usually require an access right as root.