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:

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:

Remove no longer needed packages:

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

Tell which installed package provides a command.

Tell which packages depend on cat/pkg:

Get information about a package:

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:

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:

Typical Administration
Used by an user listed in the sudoers list to obtain root shell:

Start the ssh daemon in the default runlevel at boot:

Start the xdm service now:

Check if the sshd service is running or not:

External resources

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