Portage

is Gentoo's package manager, and is installed by default as part of the stage3 install. See the Gentoo Handbook for more details.

Installation
In the case you somehow do not have Portage (it could have became corrupted or you might have removed it accidentally) there are ways you can recover it. Here are a few viable solutions in order for you to get it (back) on your system:
 * 1) Have a friend or build server build Portage binaries for you and then transfer them to your machine (hardest, and most time consuming).
 * 2) Manually download a copy of Portage tarball, manually build it, and then manually install it yourself. You will be doing all the work that Portage makes automatic (easier than the first option, and probably would take less time).
 * 3) Boot up a LiveDVD/CD that has Portage included (like a Gentoo LiveDVD or SysRescCD) in order to remove and then to reinstall install Portage to your mounted root filesystem (potentially the fastest option in the case that you have a CD/DVD burnt). For example, if the root file system with broken Portage was mounted at the following commands could be used from a live environment. To remove any traces of the broken Portage:  To sync with a current version of the Portage tree (in case you were out of sync):  To install the new version of Portage:

Overlays
In addition to the official repository (colloquially known as "portage tree" because of its traditional placement in ), there are additional repositories which in Gentoo are called overlays.


 * Gentoo Overlays: Users' Guide
 * Layman homepage
 * Browse overlays

You can search through the ebuilds available in the overlays on http://overlays.gentoo.org/ by using the eix tool.

Command-line interface: emerge
emerge is the command-line interface to the Portage system. This is how most users will interact with Portage. The  command has many possible options. For a complete list of all options see its man page:

Below you see an exemplary invocation of. The options are shortcuts for ,   and. They trigger  to ask before proceeding, display the dependency tree of packages to be installed, and to be verbose with its output. While in the context of Portage, the term "package" can also be referred to as an "atom." Don't be confused if you see the term "atom" used instead of the term "package."

GUI interfaces
There are a few GUI interfaces that exist for Portage, although some of them have become unmaintained.

Maintained


 * A GTK+-based frontend to Portage.


 * Graphical Portage frontend based on KDE4/Qt4.

Unmaintained

kport

Alternatives to Portage

 * An alternative package manager written expressly for Gentoo-based systems.

Relevant Gentoo Wiki pages

 * GCC optimization
 * Useful portage tools
 * Binary package guide
 * Portage tips
 * /etc/portage configuration files
 * Repository format
 * ebuild
 * PMS (Package Manager Specification)
 * Overlay
 * Category:Portage
 * Gentoolkit

Related sections of the Gentoo Handbook

 * A Portage Introduction
 * USE flags
 * Portage Features
 * Files and Directories
 * Configuring through Variables
 * Mixing Software Branches
 * Additional Portage Tools

Other official docs

 * q applets