By: Jason Lambert in Linux Tutorials on 2011-03-02
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 because of its automatic software download and upgrade mechanisms, and unlike RedHat doesn't keep trying to sell you something, and doesn't try to limit your use of the system.
The most powerful feature of apt-get surely is that you don't 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 probably want your default sources.list file to look something like this:
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
If you would like to use more upto date software on your machine, you will probably want your sources file like this:
deb https://ftp.debian.org/debian/ sid main contrib
deb https://non-us.debian.org/debian-non-US sid/non-US contrib
deb https://security.debian.org/ 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 occasionally 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:
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. Be careful you don't end up uninstalling your entire system!. apt-get will prompt you before removing any additional packages so watch carefully!
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
- Your name, rating, website address, town, country, state and comment will be publicly displayed if entered.
- Aside from the data entered into these form fields, other stored data about your comment will include:
- Your IP address (not displayed)
- The time/date of your submission (displayed)
- Your email address will not be shared. It is collected for only two reasons:
- Administrative purposes, should a need to contact you arise.
- To inform you of new comments, should you subscribe to receive notifications.
- A cookie may be set on your computer. This is used to remember your inputs. It will expire by itself.
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
- Although the administrator will attempt to moderate comments, it is impossible for every comment to have been moderated at any given time.
- You acknowledge that all comments express the views and opinions of the original author and not those of the administrator.
- You agree not to post any material which is knowingly false, obscene, hateful, threatening, harassing or invasive of a person's privacy.
- The administrator has the right to edit, move or remove any comment for any reason and without notice.
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Most Viewed Articles (in Linux )
Latest Articles (in Linux)
- Data Science
- React Native
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews