- For other uses, see: Gentoo (disambiguation)
Gentoo Linux is a GNU/Linux distribution named after the Gentoo Penguin. It is designed to be modular, portable and optimized for the user's machine. This is accomplished by building all tools and utilities from source code, although, for convenience, several large software packages are also available as precompiled binaries for various architectures. Gentoo achieves all this via the Portage system.
Portage is similar to the *BSD package management system called ports; in fact it was originally designed with FreeBSD's ports in mind. Gentoo's Portage system works similarly to Debian's APT. Portage is written in the Python programming language, and is the main utility that defines Gentoo. Although the system itself is known as Portage, its features are actually invoked on the command line with the program 'emerge'.
The Portage system offers the use of "USE flags," which allows users to indicate which software features they would like to include while building packages. For example, there is a USE flag to include DVD support, where available, in all packages that are compiled after the flag is enabled. The USE flags can affect which dependencies are built or what options are sent to the program when it is compiled.
The specification of USE flags is the usual way to configure programs on Gentoo.
Gentoo does not use traditional packaging systems like RPM, but instead it employs a format known as the ebuild. The main difference between RPM files and ebuilds is that RPMs are precompiled binaries. Ebuilds are text files which contain a description of the software and instructions on how to obtain, configure, compile, and install it; all from source and optimized for your machine. There are thousands of ebuilds available; the majority of which are distributed by the Gentoo mirrors. New and updated ebuilds can be obtained by synchronizing the local ebuild repository with the mirrors. This is done by executing the command "emerge --sync".
Masking is how Gentoo determines which packages are suitable for your system. Ebuilds designed for different architectures or experimental software are usually masked in a way that will not allow a stable system to install them without user intervention (e.g. adding a package to /etc/portage/package.keywords for 'keyword' masked packages or adding an ACCEPT_KEYWORDS='keyword' to the command line). Experimental packages are "Hard Masked". Installing "Hard Masked" ebuilds is risky and not recommended because they have known problems, while packages that are masked by keyword (e.g. they are available for systems with the ~x86 keyword, but not for systems with the "stable" x86 keyword) just need some testing, but possibly work just fine.
The standard way to unmask a hard-masked package is to copy its entry from /usr/portage/profiles/package.mask into /etc/portage/package.unmask.
Gentoo may be installed in several ways. The most common way to install it is by using the Gentoo Live CD, but it can also be installed by most other Linux Live CDs, and even from an existing Linux installation on another partition of the same hard drive. The machine must be prepared for installation by partitioning the hard disk and installing a base system corresponding to one of three stages. Starting from the first stage allows for more customization and optimization, and starting from the third stage allows for a quicker installation.
Installation is done in a chroot environment where Gentoo's own Portage system is used to install critical packages for the new installation. Gentoo does not feature an installation program as in many other distributions; the user follows the steps described in the guide on the Gentoo website and on the Gentoo Live CD. The full installation and usage guide can be viewed in the Gentoo Handbook.
- Stage 1, Full Installation, where the system must be bootstrapped and the base system must be compiled.
- Stage 2, System has already been bootstrapped, but the base system must be compiled.
- Stage 3, System has already been bootstrapped and the base system already compiled.
One of the three stages is chosen as a tradeoff between customizability and install time. The default compiler in Gentoo is GCC. Compiler customizations are made in an environment variable called CFLAGS. The system then must be bootstrapped, which is done by compiling the compiler and base libraries.
After the three stages, the system configuration must be written. Then, the user is free to install what they want; they can download binary packages from the Gentoo Reference Platform, as well as compile their own software.
The kernel must also be set up and installed during installation. Gentoo does not have a precompiled kernel; instead it offers various kernel sources, many with enhancement patches. Configuration can either be done by the traditional menuconfig utility included with Linux or with genkernel, an all-purpose kernel compilation program.
After the kernel is installed, the system configuration files must be edited manually to fit the needs of the user. This includes the fstab, network configuration, and system customizations. Most important is the Gentoo-specific make.conf file in /etc/. It contains settings that control the compilation of the packages and is generally updated by the system administrator when the values need to be changed from their defaults. The make.conf file contains environment variables like CFLAGS, CHOST, USE, ACCEPT_KEYWORDS and many others. Review the make.conf manpage for a complete list of variables.
Once the kernel is installed, the bootloader must be installed so that the system can be loaded without the use of external bootable media. The most popular Gentoo bootloader is Grub, although some users prefer the older Lilo.
Although not necessary for a functional Gentoo installation, a few packages separate from the base system are highly recommended: a system logger , filesystem tools, and a cron daemon. Gentoo provides several options for each tool, which the user can select based on their preferences and needs.
The final part of the installation involves creating user accounts and installing any precompiled packages the user wants. After this, the user can reboot the system. The system is now a functional standalone and no longer requires the live CD.
Starting with version 2004.0, Gentoo introduced a tool called Catalyst, which is used to build all Gentoo releases and can be used to build one's own customized install media.
It is possible to create tarballs of packages for distribution to other machines. These binary packages, with a .tbz2 extension, consist of all files installed by the package and a metadata section that makes it possible to install them by using the -k or -K options to emerge. This is particularly useful in the case of a homogeneous computing environment, where packages may be used on many machines despite having been prepared on a specific one. Additionally, because they can be installed directly to the filesystem root without using Portage, they can be extremely useful for rescuing a broken system.
Gentoo was originally designed solely for the x86 architecture, but it has been ported to many others due to the highly-portable nature of Linux, gcc, glibc and Portage. It currently runs on the x86, PowerPC, PowerPC 970, SPARC, AMD64, IA64, MIPS, DEC Alpha, HP/PA, ARM, and zSeries/s390 architectures. Gentoo was the first distribution to offer a fully functional 64bit Linux computing environment (user space and the kernel) for the PowerPC 970 architecture.
There's also a "Gentoo for Mac OS X" project which allows Mac OS X users to use Gentoo's Portage to install packages, in a similar way to the one provided by Fink (although without having to rely on a chroot environment). Although still a work in progress, this project can replace Fink because it uses the same environment as Mac OS X instead of creating a new one.
Also, projects to make Portage work on OpenBSD, FreeBSD and Sega Dreamcast are at an initial stage.
Gentoo's init system is another important feature of its system. It is similar to the System V init system that most Linux distributions used, but it uses named run levels rather than numbered ones, and dependency based scripts. It also includes a command called rc-update which manages runlevels.
Version 1.0 was the first major version of Gentoo. It was released on the 31 March 2002.
Version 1.2 was the second, released in June 2002.
In Gentoo Linux 1.4, the Gentoo Reference Platform (GRP) was introduced. It provides precompiled packages, and when combined with a stage 3, a user can have a fully working Gentoo system without the previous long install time.
In 2004, the versioning scheme changed to being year-based in the form of Year.Revision. For example, 2004.0 would be the first release of Gentoo in 2004 while 2005.3 would be the fourth revision of Gentoo in 2005.
The latest official version of Gentoo is Gentoo 2005.0. For more information, see the official Information Guide.
The portage system, however, allows the installed components of the system to be upgraded as needed to the newest version, thus negating the need to re-install the system when a new version is released.
On Monday, 26 April 2004, Daniel Robbins, founder of Gentoo Linux, stepped down as Chief Architect of the project. Before leaving, he set up a non-profit foundation, known as the Gentoo Foundation, and transferred all the copyrights to it. The initial board of trustees was appointed by Robbins and elections were scheduled for the following year. The membership of the foundation was initially set to be open. Upon his resignation, an article was posted to Slashdot.
Daniel Robbins was given rights to run the Gentoo store in perpetuity. The profits from the store are not used to further Gentoo development. Instead Mr. Robbins is allowed to keep all profit for his personal gain. This was seen as a way to compensate him for the $40,000.00US+ that he accumulated in debt supporting Gentoo development. This decision is seen as very controversial by some members of the Gentoo user, developer and management community.
Gentoo Linux Website
The Gentoo Foundation held a contest for a redesign of the Gentoo website in July 2004. Aaron Shi's design won the contest which was voted upon by the Gentoo community. 
Criticisms of the Gentoo Linux Distribution
Gentoo is sometimes criticized for poor QA (though possibly this is an unavoidable consequence of focusing on having more "up-to-date" versions of software available), unstable "stable" branches and for having a closed "upper management elite". Many of the difficulties experienced in past years from the "stable" branch have dissipated due to the addition of a separate "unstable" branch, and will most likely continue to improve with time and effort. However, Gentoo, having a bleeding edge repository of software, often relies on the "upstream"'s (i.e. original authors) QA process. This works well for highly-used software (such as Apache), but less so for little-used software. Gentoo is also criticised for its long installation process, sometimes taking days on older hardware. One of the other interesting debates commonly held is the binary versus source packaging, Gentoo using the latter by default. Source packagers claim that binaries are slow and less customizable, while binary packagers retort that some packages take days to compile and are incompatible with the needs of many users who require quick software installation. Furthermore, some compile-time customizations might make packages less stable. Both systems have advantages and disadvantages. In response to this criticism, Gentoo began offering precompiled binaries for various architectures of popular applications including KDE, GNOME, OpenOffice.org, Mozilla, Mozilla Firefox and others, and all the packages required to run them. These sets of packages are referred to as the Gentoo Reference Platform (GRP) and are updated with every new release of Gentoo. Finally, the closed "upper management elite" accusation has dissipated since Daniel Robbins formed the Not For Profit organization known as the Gentoo Foundation.
Recently, certain criticisms have been leveled at Gentoo's user base as well. See Talk:Gentoo User Criticism
Most, if not all, of these criticisms are hotly debated between a vocal minority of users of community-based Linux Distributions.
The official (yet seldom used) mascot is Larry the cow. Other semi-official mascots are the UFO guy and the Gentoo penguin. The official logo is the stylized G.