One notable new feature when Ubuntu 16.04 was released was the introduction of the apt command. In fact, the first stable version of APT was released in 2014, but it didn’t get much attention until the release of Ubuntu 16.04 in 2016.

As the frequency and ubiveness of the apt install package command gradually exceeds that of apt-get install package, more and more other Linux distributions are following in Ubuntu’s footsteps. Start encouraging users to use apt instead of apt-get.

So what’s the difference between apt-get and apt? If they have similar command structures, why do you need the new APT commands? Is apt really better than apt-get? Should the average user use the new apt command or stick with the old habit of using apt-get?

System geeks will explain all of these issues in this article, and we hope that by the end of this article you will have a clearer understanding.

Apt and apt to get

Before we start comparing apt and apt-get, let’s look at the background of the two commands and what they are trying to do.

As the motherboard for Linux operating systems such as Ubuntu, Linux Mint and Elementary OS, Debian has a robust “package management” system where every component and application is built into a software package installed on the system. Debian uses a Tool called Advanced Packaging Tool (APT) to manage this package system, but don’t confuse it with APT, they are not the same thing.

In Debian-based Linux distributions, there are various tools to interact with APT to make it easy for users to install, remove, and manage packages. Apt-get is one of the most popular command line tools. Another popular gadget was Aptitude (command line and GUI).

If you have read our guide to apt-get commands, you have probably come across many similar commands, such as apt-cache and apt-config. As you can see, these commands are low-level and contain so many features that the average Linux user will probably never use them. In other words, the most common Linux package management commands are scattered among apt-get, apt-cache and apt-config commands.

The apt command is introduced to solve the problem of too scattered commands. It includes the most widely used function options since the emergence of apt-get command, as well as the functions rarely used in apt-cache and apt-config commands.

When using apt, the user no longer has to go from apt-get to apt-cache or apt-config, and apt is more structured and provides the user with the necessary options for managing packages.

Apt = apt-get, apt-cache, and apt-config

The difference between apt and apt-get

With the APT command, users can get all the necessary tools in one place, and the main purpose of APT is to provide an efficient way to deal with Linux packages in a way that “pleases the end user.”

Apt has leaner but sufficient command options, and parameter options are organized in a more efficient way. In addition, it has several features enabled by default that are very helpful to end users. For example, you can see a progress bar when you install or remove a program using the apt command.

Apt also prompts the user for the number of packages that can be upgraded when updating the repository database.

You can do the same with apt-get if you use other apt command options.

The difference between apt and apt-get commands

Although apt has some similar command options to apt-get, it is not fully backward compatible with apt-get. That is, you can replace some apt-get commands with apt, but not all of them.

Apt command Superseded command Functions of commands
apt install apt-get install Installing software Packages
apt remove apt-get remove Removing a Software Package
apt purge apt-get purge Remove software packages and configuration files
apt update apt-get update Refresh the repository index
apt upgrade apt-get upgrade Upgrade all software packages that can be upgraded
apt autoremove apt-get autoremove Automatically deletes unwanted packages
apt full-upgrade apt-get dist-upgrade Dependencies are handled automatically when software packages are upgraded
apt search apt-cache search Search application
apt show apt-cache show Display detail

Of course, APT also has some commands of its own:

New apt command Functions of commands
apt list List packages that contain conditions (installed, upgradable, etc.)
apt edit-sources Edit the source list

Note that the APT command is still evolving, so you may see new options in future releases.

Deprecated apt-get?

No Linux distributions have officially announced that apt-get will be disabled, but at least it has more and more detailed operational features than APT. For low-level operations, apt-get is still needed.

Should I use apt or apt-get?

Since both commands are useful, should I use apt or apt-get? As a regular Linux user, system geeks recommend getting used to apt as soon as possible and starting using it first. Not only is APT recommended by Linux distributors, but it also provides an essential option for Linux package management.

Most importantly, apt has fewer options and is easier to remember and therefore easier to use, so there’s no reason to stick with apt-get.

summary

Finally, we provide two suggestions on the use:

  • Apt can be seen as a subset of the apt-get and apt-cache commands, providing the necessary command options for package management.
  • Apt-get is not deprecated, but as an ordinary user, it should be used first.


Original address: www.sysgeek.cn/apt-vs-apt-…