It is a user interface, somewhat like the frontend of certain tools that handle package-related issues. That is, it makes use of features present in programs such as:
apt-get, considered as the back-end of other tools that use the APT library. Some of its most common functions are downloading, installing, and removing packages for Debian systems.
apt-cache, displays useful information from the metadata package.
dpkg-query, a tool used to display information about the packages listed in the dpkg database.
aptis an interface that makes use of the most common features of these programs, in addition to performing other actions such as editing the list of package sources (the sources.list).
Let's take an example. has a downloadapt-get option , which is used to download an installation package to the current directory. With you can do exactly the same:apt
In which both commands will bring similar information about the packets that have that pattern. Similar, but not the same .
For more information, you can read the documentation for each referred program.
Sometimes it is better to use another tool to install than just using the apt-get, for example synapticor aptitude. It is not always the best option to use just apt-getto install.
An example of this would be downloading a specific version of, say, a c or c++ compiler . With synaptic or aptitude, you could precisely and quickly install the desired version, or switch from one version to another easily. You could also do it with apt-get, but searching and typing would make it anywhere from tedious to prone to version clutter.
Since aptit is user-focused, it can be used to do quick work on the console. However, to avoid backwards compatibility issues , it is better to use the programs it refers aptto (with their respective options enabled) than aptitself when writing scripts.
What is a paraphrase ofman apt(8)
SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
The apt(8) commandline is designed as an end-user tool and it may change
behavior between versions. While it tries not to break backward
compatibility this is not guaranteed either if a change seems beneficial
for interactive use.
All features of apt(8) are available in dedicated APT tools like apt-
get(8) and apt-cache(8) well. apt(8) just changes the default value of
some options (see apt.conf(5) and specifically the Binary scope).
So you should prefer using these commands (potentially with some
additional options enabled) in your scripts as they keep backward
compatibility as much as possible.
When to use aptor apt-get?
It depends, if you are going to work on common activities on the command line, you require a friendly UI to quickly and accurately install certain versions of programs, or you are going to make scripts, or you require the features of programs such as apt-get, apt -cache, etc., you require backwards compatibility (this is more focused on the case of scripts).
Both commands will work for you, what happens is that the command aptis new, something like the new version of apt-getthis command (apt) combines several functions of apt-getand apt-cachein a single command, this to improve the experience of the end user and he does not have to be looking for additional commands in case the dependencies of the program being installed are not available, however apt-getbeing older, it has more rigidity over apt.
From my own experience, I recommend you use the command that was initially created for the installation of packages apt-get installsince it has been supported since its creation, therefore it is more robust and reliable than apt.
It is a user interface, somewhat like the frontend of certain tools that handle package-related issues. That is, it makes use of features present in programs such as:
apt-get
, considered as the back-end of other tools that use the APT library. Some of its most common functions are downloading, installing, and removing packages for Debian systems.apt-cache
, displays useful information from the metadata package.dpkg-query
, a tool used to display information about the packages listed in the dpkg database.apt
is an interface that makes use of the most common features of these programs, in addition to performing other actions such as editing the list of package sources (thesources.list
).Let's take an example. has a download
apt-get
option , which is used to download an installation package to the current directory. With you can do exactly the same:apt
Another example is using:
In which both commands will bring similar information about the packets that have that pattern. Similar, but not the same .
For more information, you can read the documentation for each referred program.
Sometimes it is better to use another tool to install than just using the
apt-get
, for examplesynaptic
oraptitude
. It is not always the best option to use justapt-get
to install.An example of this would be downloading a specific version of, say, a c or c++ compiler . With
synaptic
oraptitude
, you could precisely and quickly install the desired version, or switch from one version to another easily. You could also do it withapt-get
, but searching and typing would make it anywhere from tedious to prone to version clutter.Since
apt
it is user-focused, it can be used to do quick work on the console. However, to avoid backwards compatibility issues , it is better to use the programs it refersapt
to (with their respective options enabled) thanapt
itself when writing scripts.What is a paraphrase of
man apt(8)
When to use
apt
orapt-get
?It depends, if you are going to work on common activities on the command line, you require a friendly UI to quickly and accurately install certain versions of programs, or you are going to make scripts, or you require the features of programs such as apt-get, apt -cache, etc., you require backwards compatibility (this is more focused on the case of scripts).
Both commands will work for you, what happens is that the command
apt
is new, something like the new version ofapt-get
this command (apt) combines several functions ofapt-get
andapt-cache
in a single command, this to improve the experience of the end user and he does not have to be looking for additional commands in case the dependencies of the program being installed are not available, howeverapt-get
being older, it has more rigidity overapt
.From my own experience, I recommend you use the command that was initially created for the installation of packages
apt-get install
since it has been supported since its creation, therefore it is more robust and reliable thanapt
.