Why I like Gentoo
Post updated:
- 2021-02-15 — I added the section with the distribution kernel.
- 2021-05-23 — Hopefully less worse use of the English language.
One of the many reasons why I like Gentoo, is the fact that it makes my computer fun to use again. It’s partly because Gentoo provide the tools to build an operating system that’s tailored for just me. Unlike most other mainstream Linux based operating systems, you’re not limited to what they see fit for you.
I also like the friendly and helpful community surrounding Gentoo. Even though Gentoo is considered to be one of the more advanced operating systems, the community (including those who work with Gentoo) is still friendly and helpful towards everyone, including newcomers who might not even be that experienced with any Linux based operating system to begin with.
There’s no elitism at all in the land of Gentoo, and you don’t get any “Internet karma” by the community for using some weird piece of software by some obscure project. Perhaps most importantly, you won’t get bashed on for choosing to install the ‘wrong’ init-system or any ‘mainstream’ or ‘uncool’ piece of software that’s ‘too easy’ to use. As a long time user of other Linux based operating systems this was a fresh breath of air for me.
If you want to read about Gentoo’s philosophy in their own words, I can highly recommend reading the article “the philosophy of Gentoo” by the creator Daniel Robbins.
Rolling release yet stable
With Gentoo, you get what I call a semi-rolling release model. When it comes to the default kernel, they always use the long-term support (LTS) kernel, and when it comes to other software they’re in no hurry to rush out any bleeding edge software to the stable repository.
Unlike most other Linux based operating systems and their binary package managers (pun intended), there’s not just two modes; “stable” and “YOLO”. With Gentoo you can of course unmask every single testing package, if you would like to ‘yolo it’, but perhaps a bit more safe approach would be to unmask a single package. If you would like to try a new testing version of your favourite text editor, you can do so by unmasking just that single package.
Gentoo doesn’t rely on various repositories to separate stable and untested packages from each other, they instead use something called keywords. There’s two keywords for every architecture:
arch (Example: amd64 , x86 , ppc-macos ) |
Both the package version and the ebuild are widely tested, known to work and not have any serious issues on the indicated platform. |
~arch (Example: ~amd64 , ~x86 , ~ppc-macos ) |
The package version and the ebuild are believed to work and do not have any known serious bugs, but more testing is required before the package version is considered suitable for arch. |
You can add keywords for a specific package (or a whole category), a specific versions of a package and all versions of a package up to or after a specific version. And yes, Gentoo categories every package into different categories. This makes it easier to find packages and it also means that packages can have the same name without it being confusing.
The package management system
Compiling your packages from source with settings and optimizations specifically tuned for your hardware can sometimes give you a significant performance boost, but with today’s hardware that is for most not something noticeable. The real benefit with compiling your own software is that you gain a greater control over the software you use. It means that you can customize both the compiler itself and the target-application options to better fit you and your system. If you don’t want and/or use a feature with a certain piece of software, why should you then have to include it with the package in the first place?
Modifying your packages isn’t as literal as with CRUX. Gentoo uses something called USE-flags, which let’s you easily enable and disable specific features for software, both on a global and on a per-package level.
An example would be the USE-flag perl
, which adds support for the programming language Perl for certain packages. My favourite terminal emulator called URxvt, comes with support for plugins via Perl, and If I want support for Perl in URxvt, I can simply install the package x11-terms/rxvt-unicode
with the USE-flag perl
enabled, but I don’t want to use Perl I can simply add the flag -perl
to completely disable support for Perl, and avoid any unnecessary features in the software itself and the installation of any extra packages.
Another thing that I like with Gentoo is the fact that it’s easy to both set up your own local repository and create your own ebuilds. An ebuild is a text file with Bash syntax that instructs the package manager on how to compile any piece of software. This means that I’m not reliant on the package maintainers to include and keep any package up to date. I can simply do it myself, without much effort.
Distribution kernel
The Distribution Kernel project aims to maintain sys-kernel/*-kernel
packages. These kernel packages have three goals:
- Covering kernel maintenance wholly within packages (install via emerge, upgrade as part of @world upgrade), without requiring additional actions from the user or resorting to non-portable hacks.
- Providing a default configuration that works for most of diverse systems, for users who are not interested in configuring their own kernel from scratch.
- Supporting different bootloaders and /boot layouts (LILO, GRUB, systemd-boot, EFI stub…) with minimal effort, including deploying self-built kernel binary packages over a fleet of heterogeneous systems.
The modern versions of Distribution Kernels support two mechanisms for changing the kernel configuration: savedconfig
and /etc/kernel/config.d directory
. Savedconfig replaces the entire default config with an administrator-supplied config file, so it is probably a better choice for those desiring to build an entirely custom kernel. When using /etc/kernel/config.d
, the configuration files are merged on top of the default configuration file, so it is more convenient for use-cases that change some specific options.
A small note about installing packages in Gentoo
I let a friend read this draft before publishing it, and it turns out that he had totally misunderstood how you install packages in Gentoo. He thought it was rather complicated, that you needed to use make
, that you needed to know where to install files and all that, but it’s actually just as easy as installing any package in any other Linux based operating system:
# emerge <package>
That’s it.
And no, installing packages doesn’t require a weekend in the freezer. Most packages doesn’t take that long at all, I would say that most packages takes about 1-5 minutes for me on my decade old computer running an Intel i5-2500k CPU.
Here’s a few examples of some of the common packages that I have (sorted in order by time):
Package | Average compile time |
---|---|
media-gfx/inkscape | 13 m 48 s |
sys-kernel/gentoo-kernel | 11 m |
media-gfx/gimp | 7 m 11 s |
x11-libs/gtk+ | 3 m 31 s |
x11-terms/rxvt-unicode | 34 s |
mail-client/neomutt | 25 s |
There is some exceptions here though, like dev-qt/qtwebengine
and app-office/libreoffice
. For me, QtWebEngine takes about 4 hours (!) to install.
A better init
When the previous operating system I was using switched over to systemd, I experienced a noticeable downgrade in terms of stability, as well as a slight downgrade in usability. The two things that annoyed me the most wasn’t the stability issues, it was the binary logs and the fact that when I booted and shut down the operating system, I would always have to wait 90 seconds (!) for some issues with a service that was not working as intended.
I used systemd for several years—I really tried to like it for what it was—but I eventually gave up it. There was always some issue with it, and it did kill the fun in using computers for a while. It also didn’t help that they had (and still have) a weird approach to software design, it’s what I would call an anti-UNIX philosophy. They also notorious for making somewhat controversial moves, but let’s not get too deep into the whole systemd controversy.
Gentoo supports multiple init-systems like OpenRC, Runit, s6 + s6-rc, sysvinit and even systemd. The default init is OpenRC, but there’s nothing stopping you from choosing any other alternative. And unlike most other Linux based operating systems, that perhaps ‘technically’ supports one alternative init, they won’t punish you for choosing a path that doesn’t align with their narrow views.
I myself uses OpenRC, as it’s what I’m used to as a pre-systemd user. I’ve been using Gentoo for years now, and I have so far never had any real issues with OpenRC. It’s robust, familiar and easy to use, just the way I prefer it to be.
The documentation
The documentation for Gentoo is superb! The Gentoo wiki is regarded as one of the best documented wiki. The first time I tried Gentoo was back in 2010. At that time, I had only been using Linux based operating systems for about 4 years, and I was still a beginner at it, but I still managed to install Gentoo all by myself, thanks to the documentation on the Gentoo wiki.
The downsides
The downsides with Gentoo can be the fact that you have to compile pretty much all software by yourself[1]. If you have a really slow computer, it can take some time to compile some packages, but as long as you do some planning you’ll be fine. And by planning, we’re talking about installing LibreOffice from source on a laptop computer the day before class, and not five minutes before class.
- Gentoo does provide some binary packages for some of the heavier packages like
app-officelibreoffice-bin
anddev-lang/rust-bin
.
Well. That’s all! I hope you liked reading my thoughts about Gentoo and that it perhaps even got you interested in trying it out for yourself.