10 Gentoo features that you will love

Post: 4 October 2013 by kriss in: Operating systems Print

Gentoo is a free Linux/FreeBSD meta-distribution. Throughout the years, it has attracted popularity by maintaining more packages and supporting more platforms than even the respected Debian distribution.

But the most obvious particularity of Gentoo is its source-based nature. This means that, rather than installing pre-compiled binaries from a central server, each package to be installed needs first to be built from scratch, using C compiler most of the time, since most UNIX software are written in C.

While being a time-consuming process, this also gives the user extreme flexibility on what should be built and what should not be. Essentially, it allows the creation of the ultimate custom environment a system administrator could ever think of.

The Gentoo distribution includes many innovative concepts and is often a source of inspiration for other operating systems. Here are 10 features that will make you love it.

Development made easy

The source-based nature of the distibution implies that build-time dependencies are automatically installed while building packages that are actually requested for install. Most of the time, such dependencies consist in header files and static libraries for C programs without which the original package could not be built. Although build-time dependencies could be removed safely after installation, Gentoo does not do such a thing. It is simply assuming that other packages with the same dependencies may be installed.

As an example, to compile a GTK+ application, one needs to have the GTK+ development files installed on the system. In Gentoo, this means that installing the first GTK+ application would also install the GTK+ development files in the first place. This subsequently allows the user to build their own GTK+ application without the need to install additional packages.

When the system is primarily designed for software development, not having to install separately development packages is a huge time saver, and Gentoo makes the process very easy and natural.

Cross-compilation made easy

Another lovely feature for developers. Those of you who attempted to build cross-compilers by yourselves know how tricky the process can be. Not anymore with Gentoo, which makes this sorcery as easy as installing any other package, through the use of cross-development tools.

Not only the tools allow to build full working toolchains for many platforms by issuing no more than a few commands, but updates to these packages are also proposed as part of the regular package updates. Something that you would probably not play with if you actually managed to successfully build your own toolchain manually.

High performance

Often cited as the main argument for using this distribution, it has been recognized that Gentoo runs really, really fast. And on many hardware. There is a good reason for this: most packages are compiled on the machine on which they run. Through a clever mechanism of global compilation flags, the package manager allows the user to tune compiler options systemwide. Ultimate performance is typically achieved by using global compilation flags that target your specific CPU, plus some other classics like -O3.

It's interesting to note that without using this kind of building profiles, or that downloading pre-compiled packages, most advanced features of your brand new CPU might not be used, for compatibility reasons. In other words, it's a bit like buying a Ferrari but not being allowed to drive faster than 100 km/h. Thanks to Gentoo, it becomes easy for anyone to fully use the hardware they paid for.

Sure, they might not run on a Pentium Pro, but really are there people still using this kind of hardware nowadays?

Great support of hardware

The Gentoo distribution is available for many different architectures, and provides either Linux or FreeBSD as the operating system kernel. Regarding the Linux kernel, several flavors are proposed, including an hardened one for systems where high security is needed.

Many drivers are also available through the package manager and provided that there exist a generic driver for the hardware, drivers are generally not an issue with Gentoo.

High availability of modern packages

The package system uses in Gentoo is Portage, a system mostly inspired by FreeBSD systems. In Portage, a lot of packages are available by default, and in even in the stable branch, versions are usually very close to the latest one. For example, Gentoo was one of the first distribution to introducce the Linux kernel version 3.

And for those web developers worrying more about PHP frameworks than binary programs, they would be happy to hear that there is no need to start their new project by downloading WordPress, Drupal, Zend Framework, or whatever. All of these can simply be obtained, installed and configured, through the package manager. They are all open source software after all. Even more incredible, emerge -pv drush is actually a valid command; Drupal users are treated well.

System consistency

The concept behind Gentoo may look fragile at first. For many programmers, the idea of compiling so many software by yourself may sound like a tedious, if not impossible, task. It would be perfectly valid to doubt about the ability to build flawessly a fully functionnal operating system.

However, the distribution manages this complexity well enough to handle the process smoothly and flawlessly. And it also boasts a sandbox feature in which packages are built prior installation. Should an error occur while building a package, the installation is cancelled and the original system is left intact.

Even while using Gentoo, chances are that most compilation errors you will ever see will be in your own programs rather than those of the distribution.

Modular init system

Gentoo Linux uses its own format for System V init scripts. This format uses its own interpreter, which provides advanced scripting features. But more importantly allows some services to depend on others. It is thus possible to have a service to automatically start when another one is started, or to refuse to start a service when another blocking one is running.

As an example, the Apache web server would not be useful without a working network, so Gentoo cleverly added the network as one of its dependency. If you attempt to start it, the system will first ensure that the network is started.

Colors everywhere

People tend to think that the more an operating system relies on the command line, the less user-friendly it is. High reliance of the console is one of the reasons why most Linux distributions are generally perceived as an operating system for advanced users.

Mind you. While it is true that the command-line is at the core of the Gentoo distribution, colors and text indentation are used everywhere. To an extent so vast that you sometimes forget that you are still on a 16-color terminal:

A typical virtual terminal in Gentoo

A typical virtual terminal in Gentoo

It starts at the command line prompt, then proceed with the file listings, the grep expressions, the package manager output and color is even enabled in the text editor nano. Sure, in other distributions, color is easy to enable, but in Gentoo, it's already done.

Constructive learning curve

When the manual says that Gentoo is aimed at advanced users, it's not lying, let's face it. Whereas some distributions tend to hide technical materials to the user to make it easier, Gentoo allows, and even suggests, customizations to make it better. However, this should not refrain the casual users of other distributions, as the system is documented enough and the community active enough to help you get started.

The lesson starts as soon as you install the system, an adventure that you should not attempt without the useful handbooks provided by the community. In the long run, using Gentoo might prove to be your best learning experience in the UNIX world. Sometimes, experience acquired here may even help you to understand the behavior of other distributions with less transparency.

Modest but complete LiveCD

Gentoo installation or restoration may be initiated though the use of a LiveCD, whose images are available from its official website.

This LiveCD is very small (less than 200 MB at the time of this writing) but contains everything you need to start the installation or repair a broken system, not necessarily a Gentoo one. Size is kept minimal as no graphical toolkit is included in the LiveCD. But it is usually not desired at this stage.

Impressed reading this article? It's time for you to give Gentoo Linux a try.