An In-Depth Look at Gentoo Linux


Imagine an Operating System that only includes the features that you actually want and use. An Operating System that is finely tuned to your computer hardware. One that doesn't include any resource hogging applications that you don't need such as "Desktop Search" or huge bloated software such as modern music players. A System that doesn't need to be re-installed or upgraded every 6-9 months like most Operating Systems. Well, if you are partial to Linux, Gentoo Linux is such an Operating System.

Gentoo Linux is what is referred to as a "Source Based Distribution". What this means is that you build all of the software that you will use directly from the "Source Code" - Source Code is what developers create and modify, mostly comprised of text files, however, computers don't understand Source Code. In order for a program to be usable on a computer, the source code needs to be compiled into Binaries (the "language" computers understand).

Since Gentoo Linux is built from source code, it is a highly configurable distribution. For instance, instead of building the source code to a generic 32 or 64 bit processor, you can tell the compiler to build the code specifically to your exact processor. This alone can give you a noticeable performance increase. As well as optimizing the binaries for your computer (cpu architecture), you can also optimize the software for the features that you want your software to have (and ignore the features you don't want to have).

Gentoo Linux has been around for over 10 years now, the peak of Gentoo's User Base was probably between 2002 and 2004 (when source based distros first hit the scene). In 2004, the original creator, Daniel Robbins, announced he was leaving the project and setup the non-profit Gentoo Foundation to take ownership of all of Gentoo's copyrights and trademarks. We believe this started a user base shift away from Gentoo. In 2007, a slight controversy, when the State of New Mexico revoked the Gentoo Foundation's Charter (it is now restored), didn't seem to help matters.

In more recent history, the Gentoo Developers decided to move away from "release versions", such as 2008.0, and simply start providing weekly automated builds to allow people to install Gentoo Linux. To us, this was a smart move. Historically when Gentoo's Major Versions were being readied for release. The Developers would "freeze" the Portage Tree to get a stable release ready. Unfortunately quickly after the release, the Portage Tree would quickly fill with updated software, which made it somewhat troublesome for new installations to get everything compiled correctly (You didn't dare update the Portage Tree until after a few weeks after the major release to ensure all the bugs from the onslaught of new packages were sorted out).

Gentoo Linux GNOME Desktop

Gentoo Linux KDE Desktop

Gentoo Linux's Live DVD 10.1 GNOME and KDE Desktops

For the 10th Anniversary of Gentoo's existence, the Gentoo Developers released a "LiveDVD" which allows you to try out a Gentoo Linux System by booting from the Disk. This is a good starting point for those that may want to try out Gentoo without going through the long process of installing Gentoo on their machines. While testing the LiveDVD we did find a few issues that you may want to be aware of if you are testing it. In order to get USB Drives to work, you must first run the commmand "sudo mkdir /media" within a terminal. Also, note that the LiveDVD isn't as cleaned up as an installation would be (menus contain software from all Desktop Environments, etc.) and that running Gentoo from a Hard Drive is much, much faster than the LiveDVD.

Installing Gentoo Linux

Although the Gentoo Developers provide some of the best Installation Documentation around, the Gentoo Installation Routine is not for the faint of heart. It is an extremely hands on installation routine, which at the end of the installation, will leave you with a very minimal Linux System that will boot on your computer. This means no X Server, no Desktop Environment, just a very basic Linux System.

This doesn't mean that you are on your own trying to figure out what to install onto your Gentoo Linux System. The Gentoo Linux Developers and Maintainers provide quite a bit of additional documentation to help you transform the standard installation into a full blown Linux Desktop Operating System. For instance: The X Server Configuration HOWTO, The Gentoo KDE Guide and The GNOME Configuration HOWTO.

It is important to note that building everything from source code can take a long time, especially if you do not have a very fast computer. For instance, building from source code (probably the largest program you will build) can take a day on some systems, although it can be compiled within a few hours on most modern processors. Fortunately, with Gentoo's Package Management System, just about everything will build cleanly the first time (including any and all dependecies).

Additionally, when (not if) you run into problems, the Gentoo Forums provide a good source of information where you will probably find the answers to the questions you may have and if not, you can post your own questions and someone will probably answer. If you need more immediate help, the Gentoo IRC Channels usually has someone on them that will try to help you out.

Portage - Package Management on Steroids

The genius behind the Gentoo Linux Distribution is it's package management utility, Portage. Basically, you tell Portage to compile so and so program and it will calculate all of the dependencies that the software needs, compile those dependencies (if any), then compile the program that you specified. Finally, it adds that program into the database of installed applications so in the future when an updated version is released it will give you the option of compiling and installing the updated software.

Portage is a built around shell scripts that take care of unpacking, building and installing software from the source code. Even though this seems pretty simple, it is extremely effective in building software source code into a coherent Operating System. It is so versatile that it allows for full customization of the software by utilizing what are called "Profiles", "USE Flags" and "Masked Packages", as well as providing an easy way to install experimental and other software that are not (yet) in the main Portage tree by using what are called "Overlays".

To configure Portage, you edit various text files that Portage uses to decide how to compile the software that you select. The main configuration file is /etc/make.conf and it contains the compiler options Portage will use and the system "USE Flags" as well as (optionally) a list of Video Cards and Input Devices that you wish to compile drivers for. You can also add a list of Licenses that Portage will automatically accept to download and install certain software.

An example make.conf file that we used for testing on an Intel Core2 Duo system is below, download it here.

CFLAGS="-march=nocona -O2 -pipe"
CXXFLAGS="-march=nocona -O2 -pipe"
###### NOTE: try to set local use flags in /etc/portage/package.use
USE="a52 aac aalib acpi alsa apache2 audiofile avahi bash_completion bonobo 
bzip2 cairo cdda cddb cdr cups curl dbus dga directfb dts dv dvd dvdr dvdread 
encode esd examples exif ffmpeg fftw firefox flac gd gif gnome gnome-keyring 
gnutls gphoto2 gstreamer gtk hal idn ieee1394 imagemagick imlib ipod jack 
java joystick jpeg jpeg2k kde kdeenablefinal ladspa lame lcms libcaca libnotify 
libsamplerate mad matroska mikmod mmx mmxext mono mp3 mp4 mpeg mplayer mtp 
musicbrainz mysql mysqli networkmanager nptl odbc ogg openal opengl oss pcmcia 
pdf plotutils png portaudio ppds pulseaudio qt4 quicktime rss samba scanner 
sdl slp smp sndfile sox speex spell sqlite sqlite3 sse sse2 startup-notification 
svg svga taglib tcltk tetex theora threads tidy tiff timidity tk truetype usb 
vorbis wavpack wifi win32codecs wmf X x264 xcb xine xinerama xml xv xvid"
INPUT_DEVICES="evdev synaptics"
#Add Overlays
source /usr/local/portage/layman/make.conf					

USE Flags

Use flags allow you to specify what features you want your system to have. For instance, the "mp3" use flag will build support for mp3 playback in music players and so on. Specifying USE flags for your system can be a daunting task, but once you are done your system will be finely tuned for the features that you use on your computer.

USE flags are broken into 2 categories, Global Use Flags and Local Use Flags. The Global Use Flags are system wide use flags that are used by many software packages. These Use flags should be specified in the /etc/make.conf file. Local Use Flags are used by individual software packages to specify how the individual package will be built. Although you can specify Local Use Flags along with the Global Use Flags in the /etc/make.conf file, it is preferred to specify them within the /etc/portage/package.use file.

An example package.use file we used for testing can be downloaded here. An explanation of all USE Flags are listed at:

Also of note is the fact that you can tell a certain package NOT to use a certain USE Flag by adding a minus sign in front of it, for instance "-gnome". When adjusting USE Flags, you can re-compile your system to take advantage of the new use Flags by issuing:

	emerge -u world --deep --newuse 

This will scan your packages to see if any of them need to be rebuilt to take advantage of the new use flags that you may have specified. It is recommended to run the above command with the -vp switch (verbose and pretend) to ensure that your use flags are to your liking before committing the changes.

Using Gentoo's Profuse to manage USE Flags

Using Gentoo's Profuse Application to Manage USE Flags

An alternate way of specifying USE Flags is by using the application Profuse. During our testing we found it useful for reference material, but we still manually set the use flags to ensure we maintained control over our software.

Masked Packages

Gentoo provides "stable" packages by default. These packages are known to be solid and are suitable for nearly any mission critical system. Gentoo also provides packages that aren't as well tested that are "masked" so that they will not automatically get installed unless the user specifies that the package can be used.

To "unmask" packages, you simply need to add the package to the /etc/portage/package.keywords file and Portage will use the masked version of the package instead of the more "stable" version. This allows you to utilize newer versions of software packages even although they might not be as well tested.

An example package.keywords file can downloaded here. Note that this file was created while utilizing the GNOME Overlay below to use the latest 2.30.0 version of GNOME and will "unmask" the latest KDE release.

To unmask larger applications that depend upon other libraries (like KDE or GNOME) can be a daunting task, which if done manually may take you an hour to unmask the dependencies. Fortunately, there is a utility, autounmask, which will pretty much do it for you (although I highly recommend making backups of your /etc/portage/ directory before running it).

For those that live on the cutting edge, you can use masked packages by default on your system by setting "ACCEPT_KEYWORDS=~arch" within the /etc/make.conf file, where ~arch is your system's archetecture. For instance "ACCEPT_KEYWORDS=~x86" for 32 bit intel systems or "ACCEPT_KEYWORDS=~amd64" on 64 bit AMD and Intel systems.


Since the Gentoo Portage system is somewhat conservative on what it considers "stable" and "masked" packages, many users have created what are called "Overlays" to provide newer packages or software that is not included within Portage (yet).

To use overlays, Gentoo has a guide at:

Many overlays exist, although we only tested the GNOME overlay and the Sunrise overlay, which seemed pretty usable to us. To view all the overlays, check out

Fixing Broken Packages and Managing Your System

On Linux Systems, when you start updating various libraries and software packages, other libraries and software packages may become "broken" and fail to work properly. This usually happens when third-party vendors start providing updated libraries and apps without fully testing the updates to ensure the Distribution's software isn't affected.

Since Gentoo is a Source based Distribution, it is extremely easy to fix these types of errors, just recompile any package that was built on the older library to ensure it uses the new library. Gentoo even has a utility called "revdep-rebuild" which scans your system for any library or application that is "broken", then automatically rebuilds that library or application. The revdep-rebuild application is included in the "gentoolkit" package.

Most Linux Configuration Settings are located within the /etc directory and although Gentoo does not provide too many "Graphical Configuration Utilities" like other Linux Distributions to adjust these settings, Gentoo provides a few utilities to ensure software updates don't overwrite the configurations that you may have set.

The "classic" utility that they created to do this is called "etc-update" and you simply type this into a terminal to scan for and list any configuration files that may need to be changed.

Of course, with developers there is always a better way to do a certain task, thus the "dispatch-conf" utlity was created. The "dispatch-conf" utility pretty much provides the same features as the "etc-update" utility, but it also provides complete backups for any and all changes that you do to the "/etc" files. This allows you to "undo" or go back and see what conf changes were made in case something goes astray. To view more information on these tools: Check out this chapter of the Gentoo Handbook.

Available Software

Now that we covered how the Portage System works, we will now cover various ways to install software and what software is available on a Gentoo Linux System. Basically to install software using Portage, you simply issue the command:

	emerge packagename

And with adding the "-vp", option to the emerge command, you can see exactly which software packages will get installed and what USE Flags are available and enabled for each software package that will get installed (you may want to adjust the USE Flags before compilation and installation).

An easy way to locate software that you may want to install on your system is by using a graphical program called "Porthole". The Porthole software package is usually masked, so unmask it by adding "app-portage/porthole" to the /etc/portage/package.keywords file, then "emerge porthole" to add the software to your system.

Using Gentoo's Porthole Application

Using Gentoo's Porthole Application to install software

Although Portage doesn't include every software that is available for GNU/Linux Systems, it has the majority of the most popular software used. Below is a chart showing some of the software (with versions) available through the various software channels available with Gentoo Linux.

Available Software Versions as of April 28, 2010
Linux Kernel2.6.32-r72.6.33-r1-

As you can see, the stable branch sometimes has quite a bit older software versions. For instance, both KDE and GNOME usually lag one major version on the stable branch. Historically, KDE has been released in a quicker manner than GNOME has on Gentoo Linux Systems, although with the GNOME overlay, GNOME can pretty much be updated very shortly after the GNOME Project releases an update. KDE usually has immediate releases through the "masked" channel. As for most software, the masked channel usually has the latest and greatest, while the stable channel has the "known to work" versions.

It is extremely nice that the Gentoo Developers have given it's users the ability to decide what software versions they wish to run on their systems.

Our Gentoo Testing

During our tests, we tested both the 32 bit and 64 bit architectures and neither one had any noticeable shortcomings, so if you have a 64bit processor, we recommend using the amd64 arch installation media for the added performance you may get. (Note that even the Intel dual core and similar processors use the amd64 arch installation media).

We followed the installation handbook while installing Gentoo Linux and upon finalizing the installation we then followed the Xorg installation guide to install the X Server. Make note of adding the appropriate drivers (video and input) to /etc/make.conf to ensure only the drivers you need get compiled. Also, when compiling the X server, we recommend that you do not touch the USE Flags until you get Xorg compiled first, then adjust the USE flags and run:

	emerge -u world --deep --newuse

This way you avoid compilation errors where Portage may try to compile libraries that require X before X is actually installed. Once we re-adjusted the USE Flags and re-adjusted the system to use these USE Flags we then compiled both GNOME and KDE and both compiled and installed without any incident. We then installed all the applications that we use on Linux Desktops.

Even though we only tested our systems for about 5 weeks, we were able to test 3 different major releases of the GNOME Desktop (2.26, 2.28 and 2.30) and 2 different versions of KDE (4.3.5 and 4.4.2). We also tested multiple releases of other popular software by unmasking the packages and updating the system. Under all of this testing, our Gentoo Linux Systems continued to be extremely stable and very responsive.

Below are some other hints and observations that may benefit those who may wish to try Gentoo Linux.

  • Build a custom Kernel optimized for your hardware. A few of our testers had quite a bit of trouble getting certain features working properly (WLAN and Audio), and once they compiled a custom Kernel fine tuned to the hardware, these problems went away. Here is a Kernel Config file for one of our test systems (An Intel Core2 Duo Laptop).
  • Get the Xorg Server working before you adjust the USE Flags this aided us immensely on later installs and actually improved our installation time for various hardware. Also remember to add the appropriate HAL policy files to ensure the Keyboard and Mouse will work correctly, otherwise you may be hard resetting the system to get back to a terminal.
  • Use the "stable" versions of most software and only unmask the software packages that you want to use the latest versions of. This will avoid many configuration issues that may occur when you use a fully unmasked system.

Final Thoughts

Gentoo Linux provides one of the most highly configurable Operating Systems around. Although the time spent installing and configuring Gentoo can turn out to be days instead of hours, the final installation will be totally optimized and customized to how you use your computer.

Gentoo Linux is not for everyone, if you don't like to manually adjusting your system and instead simply use the default settings of the software provided, then the time spent installing Gentoo will probably not be worth it for you. However, if you like to have total control of your system and want to ensure that you know every aspect of your computer and want to ensure that you have the latest versions of software available without having to re-install the system every 6 months, then Gentoo Linux is probably one of the Distributions that you may want to look at.

As for us, we are planning to at least keep a few Gentoo Linux Systems running to use as a reference for building software for other Distros, and one of us is planning on running Gentoo Linux as their main Operating System for the immediate future. Good Luck and happy Gentoo-ing.

  • Large Community, Easy to Find Help
  • Extremely Customizable
  • Excellent Performance
  • Huge Amount of Software Available
  • Always Use the Latest Software Versions
  • No Need to Reinstall / Upgrade Every 6-9 Months
  • Multiple Versions of Software Available to Install
  • Not Many Graphical Configuration Tools
  • Installation Takes Forever
  • Must be Familiar with Linux to Install / Maintain

Google Ad

© 2017 Mike Petersen - All Rights Reserved