1. Introduction
Advanced Packaging Tools (English: Advanced packaging tools, short: APT) is a package manager for Debian and its derived distributions. Apt can automatically download, configure, install binary or source code format packages, thus simplifying the process of managing software on UNIX systems. Apt was first designed as a dpkg front-end to handle the Deb-formatted package. Now after apt-rpm organization modification, APT has been able to install the RPM package in support of RPM's system management.
2. Composition
Apt is composed of several main commands as follows:
Apt-get
Apt-cache
Apt-file
In the Debian system, APT is constructed on top of dpkg.
3. Installation Source
Apt's source of software installation can be set up at the time of Debian installation, in addition to the official Debian Network installation source, the use of Debian installation CD-ROM, can even download unofficial software from the unofficial source of installation. Apt can also download source code software from some sources of installation and compile and install it itself.
4. Dependency processing
Apt downloads a list of packages from each installation source. This list contains information about the available packages that are included with this installation source. Where possible, apt installs the latest packages, and other packages on which the installed packages are installed, and the recommended packages are displayed on the screen but not installed. But in some cases apt is unable to install the package because of dependencies, for example: This package and other software packages in the system conflict, or the package depends on the package in any installation source does not exist or does not have the required version. In this case, APT returns the error message and aborts, and the user needs to resolve the dependency problem on its own.
5. Package Update mode
One of the main features of the Debian system is "never stop", in fact, APT has achieved this. When the software is upgraded, it can still continue to serve. Apt can intelligently download the latest version of the software from the installation source and install it without having to restart the computer after installation (except to update the Linux kernel). All configurations can be preserved, and upgrading software is no longer a tricky issue.
6, example
1) Search
Enter in the terminal:
Apt-cache Search <package>
This allows the system to list packages that match the <package> name.
2) Installation
Enter in the terminal:
Apt-get Install <package>
This allows the system to automatically download <package> and all dependencies, while installing the package.
3) Removal
Enter in the terminal:
Apt-get Remove [--purge] <package>
This allows the system to automatically remove <package> and any other packages that are stored in this package. --purge indicates that the package should be completely cleared.
4) Upgrade
Enter in the terminal:
Apt-get Update
This allows the system to automatically update the package list by the Ubuntu mapping point and must be run once if you want to install the latest package. Once you have modified the/etc/apt/sources.list, you must also run it once.
Enter in the terminal:
Apt-get upgrade [-u]
This will automatically upgrade all packages already installed in the system to the latest version. If a package changes dependencies and needs to install a new package, it will not be upgraded, but is identified as hold. If a package is set to the hold label, it will not be upgraded.
Enter in the terminal:
Apt-get Dist-upgrade [-u]
Similar to Apt-get upgrade, Dist-upgrade installs and removes packages to satisfy dependencies, and therefore has a certain risk.
6, Eggs
In the terminal input Apt-get-h will appear at the end of the "This apt has super Niuli (this apt has super cow power)."
In the terminal input Apt-get moo will display a cow on the screen.
$ apt-get Moo
(__)
(OO)
/------\/
/ | ||
* /\---/\
~~ ~~
... "Have you mooed today?" ...
A program called aptitude, similar to Apt-get, adds "This aptitude has no Super bull power" at the end of Aptitude-h.
Add Moo (that is, enter aptitude moo) and add the options "-V", "-vv", "-VVV", "-VVVV", "-VVVVV", "-VVVVVV" (that is, input aptitude-v moo; Moo; and so on), you will have the following output:
$ aptitude Moo
There are no Easter eggs in this program.
$ aptitude-v Moo
There are indeed no Easter eggs in this program.
$ APTITUDE-VV Moo
I have not told you that there are no Easter eggs in this program.
$ APTITUDE-VVV Moo
Stop it.
$ APTITUDE-VVVV Moo
Well, well, if I give you Easter eggs, will you stop?
$ APTITUDE-VVVVV Moo
Well, you won.
/----\
-------/ \
/ \
/ |
-----------------/ --------\
----------------------------------------------
$ APTITUDE-VVVVVV Moo
What is it. Of course it was an elephant that had been devoured by a snake.
Another software package named "Apt-build" in the APT series also has similar features:
$ apt-build Moo
(__) ~
(OO)/
___\/___/
/ /\ / /
~ / * /
/ ___/
*----/\
/ \
/ /
~ ~
... "Have you danced today?" Discow! " ...
Did you dance today? Disco )
Software writers have specifically changed the word disco to "discow" to reflect the meaning of "Cow" (cow).
Section excerpt from Wikipedia