Based on Beret, An Apt-Get Primer, http://www.linux.com/Article.pl?sid=04/12/03/177243, but not fully translated, and supplemented, it is a comparative entry related debian APT's article.
The status of the Apt-Get in the Debian project is irreplaceable. If there is a program to represent Debian, it is undoubted that the APT-GET, APT-GET and DEB package provide powerless features that RPM cannot be available.
In addition to the convenience of the APT, a major advantage of APT-GET is greatly reduced by the chance of so-called dependencies, even if it is deprecyncy hell, Apt-Get also provides a good assistance. , Help you escape from the magic cave.
Usually the APT-GET is out with a compressed package on the Internet, downloaded or installed from the Internet. The world has more than 200 Debian official mirrored, and there are still a wide range of non-official software packages. Different DBIAN-based publishments you are using, the software warehouse you use may need manual selection or automatic settings. You can get a full mirror list from the Debian official website. Many non-official websites offer a variety of non-official software packages, of course, there will be more risks using an un official software package.
The package is for a basic debian release version (from UnStable to Stable), and divided into different categories (such as Main Contrib Nonfree), which is divided according to the Debian Free Software Program (that is, often said DFSG), because the US restricts encryption software export, there is also a Non-US category.
The setup format in the configuration files dependent on the APT-GET get the package /etc/apt/sources.list is
Deb [server-type] [address] [Directories] [allas]
An example of the text:
Deb http://mirror.peer1.net/debian main contrib Non-free
I am in school.
Deb http://debian.ustc.edu.cn/debian/ testing main control non-free
If you use DEB-SRC instead of deb, then the source code package is referred to. Usually acquire files using HTTP and F TP, but you can also use local files, and more rare RSH and SSH, but all can be. Using the NetSelect-APT can be used to determine which image is faster. After modifying the mirror information, you should use the APT-GET UPDATE command to update the information of the package.
You can see the information about the package from the Debian website, and on the other hand, you can use DPKG -L to see which packages have been installed. Very large procedures, such as GNOME, usually have an empty package, just to install all other software by dependencies, and these software can be installed one by one.
You can install the package using Apt-Get Install [Package-Name]. You don't need version numbers here. The APT-GET will automatically select the latest. If the latest is already installed, then it will not be installed. If you want to install an older version, you can choose the version, such as
APT-GET Install GIMP = 2.2
You can also choose a specific release version
APT-GET Install -t unsteable gimp
For installation source code, you can use Source instead of install, if you need to compile it, use the -b option, the package will be downloaded to the current directory. (Aptitude Note: Only root can be install, but no one can source.) Before execution, how many packages are to be installed, upgrade, if you want to install, the software is not just the package you pointed out. Then it will ask you to continue. You can use -s to see the result of the run (Note: I don't know how this is simulated, I didn't tried)
APT-GET installation process, the installation status is displayed, and sometimes the APT-GET calls Debconf based on the requirements of the package to allow the user to enter some configuration options. This configuration is generally some choices, usually selecting the default, you can also use -yes to declare that all default options are required. (Note: If you use cron to automatically update the system every day, this option is still very useful, although I always feel a little scared.)
APT-GET Upgrade does not install a new package, only upgraded the original package version, to upgrade the entire system, you might want to install new packages, this can be done with Dist-Upgrade, such as upgrade S Table Testing, it is recommended to upgrade Stable to Unstable, first upgrade to Testing to reduce risks.
Using the APT-GET Clean can release the cache space occupied by the APT-GET can also use the autocl Ean command so that only files that are no longer downloaded again.
You can also delete the package using the remove command. (Note: If you want to delete the configuration file, you need to use the --purge parameter)
Sometimes there will be problems, you can use some of the following methods:
-f repair dependencies - M ignored problems (this is not like a problem with a problem) -ignore-Hold ignored problematic HOLD -S report package status
Of course, if your skills and patience are not enough, be careful to use the system. Normal use usually doesn't cause a lot of problems that need to be solved :)
For many years, Apt-get has many front ends. In addition to the commercial version, others can be installed through the APT-GET. Under the text interface, Aptitude is not bad, browsing the package is relatively convenient. For the graphical interface Synaptic is a good choice, compare the original APT, and Kpachage is not so like a APT.
Most of the desktops have a tendency to abandon the command line with Linux versions, but the APT-GET is a command line is the best case. Its existence is the reason why it is based on Debian-based systems. And the APT-GET has even been transplanted into the RPM system.