Installing using Debian apt-get in Linux

By: Jason Lambert Emailed: 1785 times Printed: 2623 times    

Apt-Get is a wonderful package management system for Debian GNU/Linux. Apt-Get, like RPM make installing and managing installed software easy, and once again has the same disadvantages that binaries are pre-built and cannot really be fine tuned to your system very well. I really like Apt-Get becuase of its automatic software download and upgrade mechanisms, and unlike Redhat doesnt keep trying to sell you something, and doesnt try to limit your use of the system.

The most powerful feature of apt-get surely is that you dont manually have to find & download the software you want to install, apt-get will do this for you, and also resolve any software dependencies. Before you can use apt-get for the first time, you must do a small bit of configuration.

You need to edit your /etc/apt/sources.list file, to specify the locations of Debian packages. You will proberly want your default sources.list file to look something like this:
deb stable main contrib non-free
deb stable/non-US main contrib non-free
deb stable/updates main contrib non-free
If you would like to use more upto date software on your machine, you will proberly want your sources file like this:
deb sid main contrib
deb sid/non-US contrib
deb stable/updates main
The first sources.list file uses the stable branch of debian packages. Software installed when using the stable version has undergone more testing, and in theory has less bugs. However, the software on the stable branch is usually much older versions, so you may be missing out on new features etc. The second example sources.list uses the UnStable branch. This means you will get newer versions of software, but you may occaisionally run into bugs which have not yet been fixed. I myself use and recommend using the unstable branch, the software on the stable branch is 2 or 3 years behind the unstable.

Once you have confirmed your sources.list file, we need to update our local list of packages that are available for installation. To do this, use the following command after logging in as the root user:

apt-get update After updating the list, you can install applications like so:
apt-get install <program> To see a list of available programs that you can install, or to find a particular program, we can use apt-cache, like so:
apt-cache search <something> Replace <something> with a application name or word. Eg, to find an irc client to install, you could execute
apt-cache search irc

To uninstall software is fairly straight forward also.
apt-get remove <application> replace <application> with the name of the program you want to remove.

A word of caution: If you try to remove a piece of software that other pieces of software depend on, apt-get will also want to un-install those other pieces of software as well. Becareful you dont end up uninstalling your entire system!. apt-get will prompt you before removing any additional packages so watch carefully!

Most Viewed Articles (in Linux )

Latest Articles (in Linux)

smskannel SMS gateway run in background

Running jar files in background in ssh window

Could not open '': No such file or directory at lib/ExtUtils/ line 2697

Can't locate ExtUtils/ in @INC ...

bash: make: command not found

apxs: command not found

bash: svn: command not found

make: Nothing to be done for `all'.

How to burn your CD / DVD ISO image using Media Creator (Adaptec/Roxio) on Windows

How to burn your CD / DVD ISO image using Nero Burning ROM (Ahead Software) on Windows

How to burn your CD / DVD ISO image using Nero Express (Ahead Software) on Windows

How to burn your CD / DVD ISO image using NISO Recorder V2 Power Toy on Windows

How to burn your CD / DVD ISO image using k3b on CentOS

Compiling and Installing software from source in Linux

Installing RPM's using the Redhat Package Manager in Linux

Comment on this tutorial