Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Managing Debian Software with APT (apt-get etc)
Prev Home Next

APT HOWTO
Chapter 2 - Basic Configuration


2.1 The /etc/apt/sources.list file

As part of its operation, APT uses a file that lists the 'sources' from which packages can be obtained. This file is /etc/apt/sources.list.

The entries in this file normally follow this format:

     deb https://host/debian distribution section1 section2 section3
     deb-src https://host/debian distribution section1 section2 section3

Of course, the above entries are fictitious and should not be used. The first word on each line, 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), which are the original program sources plus the Debian control file (.dsc) and the diff.gz containing the changes needed for `debianizing' the program.

We usually find the following in the default Debian sources.list:

     # See sources.list(5) for more information, especially
     # Remember that you can only use http, ftp or file URIs
     # CDROMs are managed through the apt-cdrom tool.
     deb https://http.us.debian.org/debian stable main contrib non-free
     deb https://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
     deb https://security.debian.org stable/updates main contrib non-free
     
     # Uncomment if you want the apt-get source function to work
     #deb-src https://http.us.debian.org/debian stable main contrib non-free
     #deb-src https://non-us.debian.org/debian-non-US stable/non-US main contrib non-free

These are the lines needed by a basic Debian install. The first deb line points to the official archive, the second to the non-US archive and the third to the archive of Debian security updates.

The two last lines are commented out (with a `#' in front), so apt-get will ignore them. These are deb-src lines, that is, they point to Debian source packages. If you often download program sources for testing or recompiling, uncomment them.

The /etc/apt/sources.list file can contain several types of lines. APT knows how to deal with archives of types http, ftp, file (local files, e.g., a directory containing a mounted ISO9660 filesystem) and ssh, that I know of.

Do not forget to run apt-get update after modifying the /etc/apt/sources.list file. You must do this to let APT obtain the package lists from the sources you specified.


Managing Debian Software with APT (apt-get etc)
Prev Home Next

 
 
  Published under the terms of the GNU General Public License Design by Interspire