Package Management In Gentoo Linux

Package Management In Gentoo Linux

 

This post was last updated on August 3rd, 2020 at 01:55 pm

Gentoo Linux is a Linux distribution that is distributed in source format. That means the source code can be compiled locally according to the user’s requirement. Since the operating system is available in the source format it can be optimized for a specific type of computer.

Like Arch Linux, Gentoo Linux also follows a rolling release cycle to update the operating system into a new version. Portage is used in Gentoo for software distribution and package management. In this article, we are going to discuss portage, emerge flag, and its commands.

Emerge/Portage-

Portage is the official package manager and software distribution system of Gentoo Linux. Emerge is a frontend to portage or it provides the command-line interface to the portage system. It has various commands which can be used to perform operations like installation, removal, upgradations, etc. Some important commands are discussed below in this article.

Emerge/Portage Commands-

emerge --sync – It will sync your system with current Gentoo repository
emerge --search string or emerge -s string – Searches for the given string in the all available package if a package matches the given string will be displayed. This command accepts a regular expression as a string argument.
emerge --update --deep world -Check and update all the packages on the system to the latest version
emerge --searchdoc string or emerge -S string – Searches for the package name if matches with the given string will be displayed with full description in the terminal.
emerge package_name(s)– Will install the given package or packages
emerge -uD package_name(s)– Update the package or packages with their dependencies
emerge --depclean package_name(s) or emerge -c package_name(s)– This command will remove the specified package or packages.
emerge --depclean – Remove the packages that are orphaned.
emerge -evp --deep world– Will display the list of all the packages currently installed on the system

To use some other useful package management tools like equery, it is recommended to installgentoolkit. To install it use the following command-
emerge app-portage/gentoolkit
Some useful equery commands are-
equery depends package_name(s)– List all the package that depends on the mentioned package.
equery files package_name(s)– List all the file that is owned by a package
equery belongs filename– Will list all the package that owns a particular file.

ebuild –

By default package management systems like Pacman(in Arch Linux) use binary packages directly but in Gentoo Linux instead of using these binary packages or using precompiled binaries like RPM binaries, it uses a format known as the ebuild. An ebuild is a shell script that contains the description of software that how to obtain, configure, compile, and install it.

USE Flag –

The portage system offers the USE flags in Gentoo. It allows users to mention which software feature they like to include or exclude while building packages. To know which USE flags are available for a specific package, use the following command in your terminal-
equery uses package-name (To use it first install gentoolkit)
For specific use of USE flag please follow this guide Using USE flags. If still you have a query you can write in the comments below of this article.

Previous Logical Volume Manager(LVM)
Next The Concept Of RAID
 

About author

You might also like

Package Manager 0 Comments

How to Install apt or apt-get and Synaptic on RedHat Linux or Fedora

This post was last updated on July 9th, 2020 at 03:40 pmQuick and simple to do command line apt: System-wide proxy set up: If you have to use a proxy

Package Manager 0 Comments

How To Install Or Remove Packages Using Ports Collection In FreeBSD?

This post was last updated on August 1st, 2020 at 12:11 pmFreeBSD provides various tools as a part of its base system. In FreeBSD, there are two ways to install

Package Manager 0 Comments

Package Managemet In Slackware

This post was last updated on August 3rd, 2020 at 01:51 pmSlackware is a Linux distribution developed by Patrick Volkerding initially it was released in 1993. The distribution was based

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply