Long Live Open Source Software !!

For debian or ubuntu or linux mint users, apt is a powerful tool to install program/package into their system. But in order to work properly, apt must be configured. Especially from where did it obtain software package.So you must edit your sources.list file that usually exists in /etc/apt directory.

APT can obtain software packages from many types of repository like web server, ftp server, file system or cd-rom. So, it’s your job to configure apt so that it knows where to download software packages. You can add many repository in single sources.list file. Maybe you want download software packages from ubuntu mirror site and CD, or maybe from many mirror. You can add each repository in a single line in sources.list file.

The deb type describes a typical two-level Debian archive, distribution/component. Typically, distribution is generally one of stable unstable or testing while component is one of main contrib non-free or non-us The deb-src type describes a debian distribution┬┤s source code in the same form as the deb type. A deb-src line is required to fetch source indexes.

The format for a sources.list entry using the deb and deb-src types are:

deb uri distribution [component1] [component2] […]

The URI for the deb type must specify the base of the Debian distribution, from which APT will find the information it needs. distribution can specify an exact path, in which case the components
must be omitted and distribution must end with a slash (/). This is useful for when only a particular sub-section of the archive denoted by the URI is of interest. If distribution does not specify an exact path, at least one component must be present.

I think some people won’t understand with the above step. I’ll give an example to you below.

If the Repository is a http server (web), type like this :

deb http://packages.linuxmint.com elyssa main upstream import

If the Repository is a ftp server, type like this :

deb ftp://ftp.debian.org/debian unstable contrib

If the Repository is a file system, type like this :

deb file:/home/bazz/debian stable main contrib non-free

For CD-rom, you can type :

apt-cdrom add

after that, your system will scan your cd rom drive for any repository and add it to sources.list file.

After your read above, i think now you can see some pattern there. Look at the second column, you’ll see path to website, ftp server or directory in filesystem. Third column always contain codename or distribution name for the distro. Fourth until last column contain the section name. If you don’t know what should be written there, just remember this, in Debian, you can write main, contrib and non-free. In Ubuntu, you can write main, universe, multiverse, and restricted. In Linux Mint, you can write main, upstream and import. You don’t have to write all of them, but i suggest you write all of them, so you will have more software to install.

Reblog this post [with Zemanta]
Be Sociable, Share!

Maybe you like this post too :