Hardware

Linux package manager: pacman, yum, apt ...

Table of contents:

Anonim

The package manager in Linux is basic when choosing a Linux distribution, since thanks to its commands we will be able to carry out all the daily tasks and installations on our computer. Therefore, we always recommend you to use the HELP command and visit good sites with a lot of information. So we bring you this practical guide.

Which Linux package manager is right for you?

Like any new Linux user, you may be overwhelmed by the sheer number of options you have when it comes to distributions that you can install on your desktop computer. What is the difference between Ubuntu, Fedora, OpenSUSE, Sabayon or Arch? Ultimately, the short answer is: package managers.

Each distro offers users a unique method of installing and maintaining their system, with varying degrees of ease and usability.

This guide will serve as a brief explanation on how to perform basic tasks in each of the package management systems, so you can decide which one is right for you.

Pacman

It is a popular and simple but powerful Arch Linux package manager and some little known Linux distributions. It provides some of the fundamental functions of other package managers, including installation, automatic dependency resolution, update, uninstallation and also software disqualification .

It is designed to be simple and easy to manage packages for Arch users.

YUM

YUM is a resolution dependency for the RPM package manager. YUM is the default value for the package management system included in quite a few Red Hat derivatives, including Fedora 21 and CentOS. The syntax for YUM is simple, and Apt users will have no problem making the change.

Updating and upgrading through YUM is very simple, where the following command takes care of the tasks:

sudo yum update

To install a package, the following command is used:

sudo yum install $ packageName

Also, to remove a package, the command is:

sudo yum remove $ packageName

To search for an installable package:

sudo yum search $ packageName

YUM does not include an autoremove command for finding and removing unused dependencies, however it does include a great feature for installing a package from a url, which Apt does not include:

sudo yum install $ url

APT

Apt is a resolution dependency for Debian based systems like Ubuntu. In conjunction with dpkg, the Apt package manager provides an easy way to update, install and remove software. Without Apt, maintaining a Debian system would be like using Linux in the 1990s.

Apt has a nice simple syntax, even though it is being rewritten to provide a simple and clear syntax. As such, depending on the version you are using (Ubuntu 14.04 and higher includes the new Apt commands), you can use different commands to achieve the same results.

To update the software repositories, use the following command:

sudo apt-get update

or

sudo apt update

To update the software:

sudo apt-get upgrade

or

sudo apt update

For a more complete upgrade, which also tries conflicting package dependencies to the latest version and removal of old or unused ones, the command is as follows:

sudo apt-get dist-upgrade

or

sudo apt full-upgrade

These commands can be combined to perform an update in succession like this:

sudo apt-get update && sudo apt-get upgrade

or

sudo apt update && sudo apt upgrade

To install the software, the command is:

sudo apt-get install $ packageName

or

sudo apt install $ packageName

To remove a package:

sudo apt-get remove $ packageName

or

sudo apt remove $ packageName

By limiting your system software using the apt-get remove command, Apt does a good job of extracting unused dependencies, however sometimes in the course of software removal or an upgrade some later dependencies may stay in the system. If you want to remove these packages from the system. Apt includes a command for this task:

sudo apt-get autoremove

or

sudo apt autoremove

Search for an installable package:

sudo apt-cache search $ packageName

or

sudo apt search $ packageName

Apt does not currently offer the ability to install a package from a url, which means that the user must find and download the package to be installed by himself. Ubuntu and some of its derivatives have managed to combat this with a single click to apturl links, which are found on some websites.

Entropy

Entropy is the default package manager for the Sabayon Linux system, a derivative of Gentoo. What makes Entropy interesting is that Sabayon uses binary files through Entropy, and also the source code through Gentoo's package manager Portage. A basic summary of this system is as follows:

  • Source packages are built into binary files through Entropy, using Portage. Entropy converts binaries into an Entropy package. Entropy packages are added to the Sabayon repository. User installs a binary file through Entropy.

Entropy is comparable to Apt, YUM, ZYpp, and DNF, which means that the commands are easy to use for beginners. Entropy also includes shortcuts.

To update the software:

sudo equo update

or

sudo equo up

To update all packages:

sudo equo upgrade

or

sudo equo u

These commands can be used at the same time:

sudo equo update && sudo equo upgrade

or

sudo equo up && sudo equo u

To install a package:

sudo equo install $ packageName

or

sudo equo in $ packageName

To remove a package:

sudo equo remove $ packageName

or

sudo equo rm $ packageName

To search for an installable package:

sudo equo search $ packageName

ZYpp

ZYpp is another resolution dependency for RPM package management, and is the default package manager for OpenSUSE and SUSE Linux Enterprise. ZYpp uses binary.rpm, like YUM, but it is slightly faster because it is written in C ++, while YUM is written in Python. ZYpp is extremely easy to use as it includes command shortcuts that can be used instead of full commands.

WE RECOMMEND YOU The best Linux distributions 2018

Like YUM, ZYpp updates and improves all packages with the following command:

sudo zypper update

or

sudo zypper up

To install a package:

sudo zypper install $ packageName

or

sudo zypper in $ packageName

To remove a package, use the command:

sudo zypper remov $ packageName

or

sudo zypper rm $ packageName

Search for an installable package:

sudo zypper search $ packageName

Like YUM, there is no autoremove command included in ZYpp. Also, like Ubuntu, OpenSUSE has one-click installation links for the web based on the installation package.

DNF, or Dandified YUM

DNF is a YUM rewrite that uses ZYpp features, more particularly dependency for resolution capabilities. DNF is the default package manager for Fedora 22 and higher, and should become the default CentOS system in the future.

To update and upgrade the entire system:

sudo dnf update

To install a package:

sudo install $ packageName

To remove a package:

sudo dnf remove $ packageName

Search for an installable package:

sudo dnf search $ packageName

Unlike YUM and ZYpp, DNF provides the autoremove command to search the system and remove dependencies without using:

sudo dnf autoremove

And DNF also allows the installation of packages from a URL:

sudo dnf install $ url

Testing the different package managers available, you can find the manager that is most comfortable for you in any distro.

We recommend reading how to create a Bootable Ubuntu USB.

Package management is very important in Linux, and knowing how to use multiple package managers can help a user, since downloading or installing software from repositories, in addition to updating, managing dependencies and uninstalling software is very vital and a critical section in Linux system administration.

Which package manager is best for you? Have you tried installing one of these package managers outside the default distro? Hopefully you liked it and if you want more tutorials on Linux, you can leave your comments and share on social networks.

Hardware

Editor's choice

Back to top button