By: Jason Lambert Printer Friendly Format
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 http://http.us.debian.org/debian stable 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 http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free
deb http://ftp.debian.org/debian/ sid main contrib
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.
deb http://non-us.debian.org/debian-non-US sid/non-US contrib
deb http://security.debian.org/ stable/updates main
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:
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)
Comment on this tutorial
- Data Science
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews