Adding mirrors in linux

If the mirror hostings are not available in source list, you can always add one.
First, to be on safe side, backup the sources.list before editing it.

sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
sudo vi /etc/apt/sources.list

The entries in the file follows like : type, location and components of a repository,
Here is what my sources.list look like after modifying.

deb quantal main restricted multiverse
deb-src quantal main
deb quantal-updates main restricted multiverse
deb-src quantal-updates main

deb quantal universe
deb-src quantal universe
deb quantal-updates universe
deb-src quantal-updates universe

deb quantal-security main restricted multiverse
deb-src quantal-security main
deb quantal-security universe
deb-src quantal-security universe

deb or deb-src, indicates the type of archive: whether it contains binary packages (deb), that is, the pre-compiled packages that we normally use, or source packages (deb-src). is the local repository hosted by NT, where I can find lots of packages necessary for apt-get. It may differ based on your location.

Make sure to run apt-get update after editing the /etc/apt/sources.list, APT will obtain the package lists from the sources mentioned.

Leave a comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.