Package Management In Gentoo Linux

Package Management In Gentoo Linux

Gentoo Linux is a Linux distribution which 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 about 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 a software that how to obtain, configure, compile and install it.

USE Flag –

The portage system offers the use 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 sepcific 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

Uncategorized 0 Comments

How to Fix Windows And Linux Showing Different Time In A Dual Boot System

0.0 00 There are many users who use a dual boot computer. Dual-booting Linux with Windows operating system has various advantages like both the operating systems have full access to

Uncategorized 0 Comments

File Ownership And Permissions In Linux/Unix

0.0 00 Linux and Unix are multi-user operating systems that means different users can access the operating system at a time and can use system resources simultaneously. So the files

Uncategorized 0 Comments

Package Management In Arch Linux

0.0 00 Using Arch Linux as your operating system has its own advantage. It uses a rolling release model which means there is no major release of a new version

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply