Gentoo Cheat Sheet

This is a reference card of useful commands for administrating Gentoo.

Portage Package Management
Sync the Portage tree using the mirrors by fetching the latest differences:

Sync the Portage tree using the mirrors by obtaining a Portage snapshot that is at most a day old:

Sync the overlay and Portage tree using eix:

List what packages would be installed without installing them:

Install a specific version of a package:

Remove a package and the dependencies that no other packages depend on:

Remove a package but not its dependencies:

Check for and rebuild missing libraries

Remove no longer needed packages:

Upgrade the selected packages, dependencies and deep dependencies that are outdated or have USE flag changes:

equery is a collection of modules for querying the state of Gentoo packages, files and USE flags.

Tell which installed package provides a command.

Tell which packages depend on cat/pkg:

Get information about a package using eix:

A graphical user interface to use with the Portage tree:

Manage configuration changes after an emerge completes:

Rebuilds packages that depend on an recently updated library:

genlop
genlop is a portage log processor, also estimating build times when emerging packages.

To view last 10 merges, run

To view how long merging openoffice took

To estimate how much 'emerge -uU world' will take

Have a console watching the latest merging ebuild during upgrade

USE flags
Obtain descriptions and usage of the USE flag X:

Obtain a description of the png USE flag:

Show what packages have mysql use flag option:

Show what use flags are available for a specific package:

Quickly add a required USE flag for a package install

Typical Administration
Obtain root shell (if the current user is listed in the sudoers list):

Start the ssh daemon in the default runlevel at boot:

Start the xdm service now:

Check if the sshd service is running or not:

Important Files

 * : Global settings (USE flags, compiler options)
 * : USE flags of individual packages
 * : Keyword individual packages; e.g. ~amd64, ~x86, or ∼arm
 * : Accepted licenses
 * : List of explicitly installed package atoms
 * : Contains for every installed package a set of files about the installation

External resources

 * Original gentoo-cheat repository
 * Forum post about gentoo-cheat