A popular expression in the Linux forums nowadays is noting that someone “uses Arch btw”, signifying that they have the technical chops to install and use Arch Linux, a distribution designed to be cutting edge but that also has a reputation of being for advanced users only. Whether this meme was originally posted seriously or was started as a joke at the expense of some of the more socially unaware Linux users is up for debate. Either way, while it is true that Arch can be harder to install and configure than something like Debian or Fedora, thanks to excellent documentation and modern (but optional) install tools it’s no longer that much harder to run than either of these popular distributions.
For my money, the true mark of a Linux power user is the ability to install and configure Gentoo Linux and use it as a daily driver or as a way to breathe life into aging hardware. Gentoo requires much more configuration than any mainline distribution outside of things like Linux From Scratch, and has been my own technical white whale for nearly two decades now. I was finally able to harpoon this beast recently and hope that my story inspires some to try Gentoo while, at the same time, saving others the hassle.
A Long Process, in More Ways Than One
My first experience with Gentoo was in college at Clemson University in the late ’00s. The computing department there offered an official dual-boot image for any university-supported laptop at the time thanks to major effort from the Clemson Linux User Group, although the image contained the much-more-user-friendly Ubuntu alongside Windows. CLUG was largely responsible for helping me realize that I had options outside of Windows, and eventually I moved completely away from it and began using my own Linux-only installation. Being involved in a Linux community for the first time had me excited to learn about Linux beyond the confines of Ubuntu, though, and I quickly became the type of person featured in this relevant XKCD. So I fired up an old Pentium 4 Dell desktop that I had and attempted my first Gentoo installation.
For the uninitiated, the main thing that separates Gentoo from most other distributions is that it is source-based, meaning that users generally must compile the source code for all the software they want to use on their own machines rather than installing pre-compiled binaries from a repository. So, for a Gentoo installation, everything from the bootloader to the kernel to the desktop to the browser needs to be compiled when it is installed. This can take an extraordinary amount of time especially for underpowered machines, although its ability to customize compile options means that the ability to optimize software for specific computers will allow users to claim that time back when the software is actually used. At least, that’s the theory.
It didn’t work out too well for me and my Dell, though, largely because Dell of the era would put bottom-basement, obscure hardware in their budget computers which can make for a frustrating Linux experience even among the more user-friendly distributions due to a general lack of open-source drivers. I still hold a grudge against Dell for this practice in much the same way that I still refuse to use Nvidia graphics cards, but before I learned this lesson I spent weeks one summer in college with this Frankensteined computer, waiting for kernels and desktop environments to compile for days only to find out that there was something critical missing that broke my installations. I did get to a working desktop environment at one point, but made a mistake with it along the way and decided, based on my Debian experiences, that re-installing the operating system was the way to go rather than actually fixing the mistake I had made. I never got back to a working desktop after that and eventually gave up.
This experience didn’t drive me away from Gentoo completely, though. It was always at the back of my mind during any new Linux install I performed, especially if I was doing so on underpowered hardware that could have benefited from Gentoo’s customization. I would try it occasionally again and again only to give up for similar reasons, but finally decided I had gained enough knowledge from my decades as a Debian user to give it a proper go. A lot has changed in the intervening years; in the days of yore an aspiring Gentoo user had to truly start at the ground up, even going as far as needing to compile a compiler. These days only Gentoo developers take these fundamental steps, providing end users with a “Stage 3” tarball which contains the core needed to install the rest of Gentoo.
Bringing Out The Best of Old Hardware
And I do have a piece of aging hardware that could potentially benefit from a Gentoo installation. My mid-2012 Macbook Pro (actually featured in this article) is still a fairly capable machine, especially since I only really need a computer these days for light Internet browsing and writing riveting Hackaday articles. Apple long ago dropped support for this machine in macOS meaning that it’s no longer a good idea to run its native operating system. In my opinion, though, these older, pre-butterfly Macs are still excellent Linux machines aside from minor issues like finding the correct WiFi drivers. (It also can’t run libreboot, but it’s worth noting that some Macs even older than mine can.) With all of that in mind I got to work compiling my first Linux kernel in years, hoping to save my old Macbook from an e-waste pile.
There’s a lot expected of a new Gentoo user even with modern amenities like the stage 3 tarball (and even then, you have to pick a stage file from a list of around 50 options), and although the handbooks provided are fairly comprehensive they can be confusing or misleading in places. (It’s certainly recommended to read the whole installation guide first and even perform a trial installation in a virtual machine before trying it on real hardware.) In addition to compiling most software from source (although some popular packages like Firefox, LibreOffice, and even the kernel itself are available as precompiled binaries now), Gentoo requires the user to configure what are called USE flags for each package which specify that package’s compile options. A global USE flag file is also maintained to do things like build GNOME, Bluetooth, even 32-bit support into every package, while specific package USE flags are maintained in other separate files. For example, when compiling GIMP, users can choose which image formats they want their installation of GIMP to support. There’s a second layer of complexity here too as certain dependencies for packages can be “masked” or forbidden from being installed by default, so the user will also need to understand why certain things are masked and manually unmask them if the risk is deemed acceptable.
One thing that Gentoo has pioneered in recent years is the use of what it calls distribution kernels. These are kernel configurations with sane defaults, meaning that that they’ll probably work for most users on most systems on the first try. From there, users can begin tweaking the kernel for their use case once they have a working installation, but they don’t have to do that leg work during the installation process anymore. Of course, in true Gentoo fashion, you can still go through the process of configuring the kernel manually during the install if you choose to.
Aside from compiling a kernel, Gentoo also requires the user to make other fundamental choices about their installation during the install process that most other major distributions don’t. Perhaps the biggest one is that the user has to choose an init system, the backbone of the operating system’s startup and service management systems. Generally most distributions decide for you, with most larger distributions like Debian, Fedora, and Arch going with systemd by default. Like anything in the Linux world, systemd is controversial for some, so there are alternatives with OpenRC being the one with the most acceptance in the Gentoo world. I started out with OpenRC in my installations but found a few pieces of software that I use regularly don’t play well with it, so I started my build over and now use systemd. The user also can select between a number of different bootloaders, and I chose the tried-and-true Grub seeing no compelling reason to change at the moment.
In addition, there’s no default desktop environment, so you’ll also need to choose between GNOME, KDE, XFCE, any other desktop environment, or among countless window managers. The choice to use X or Wayland is up to you as well. For what it’s worth, I can at least report that GNOME takes about three times as long to compile as the kernel itself does, so keep that in mind if you’re traveling this path after me.
It’s also possible you’ll need to install a number of drivers for hardware, some of which might be non-free and difficult to install in Gentoo while they might be included by default in distributions like Ubuntu. And, like everything else, they’ll need to be compiled and configured on your machine as well. For me specifically, Gentoo was missing the software to control the fans on my MacBook Pro, but this was pretty easy to install once I found it. There’s an additional headache here as well with the Broadcom Wi-Fi cards found in older Macs, which are notoriously difficult pieces of hardware to work with in the Linux world. I was eventually able to get Wi-Fi working on my MacBook Pro, but I also have an 11″ MacBook Air from the same era that has a marginally different wireless chipset that I still haven’t been able to get to work in Gentoo, giving me flashbacks to my experience with my old Dell circa 2007.
This level of granularity when building software and an overall installation is what gives Gentoo the possibility for highly optimized installations, as every package can be configured for the user’s exact use case for every package down to the kernel itself. It’s also a rolling release model similar to Arch, so in general the newest versions of software will be available for it as soon as possible while a Debian user might have to wait a year or two for the next stable release.
A Few Drawbacks
It’s not all upside, though. For those without a lot of Gentoo experience (including myself) it’s possible to do something like spend a day and a half compiling a kernel or desktop environment only to find out a critical feature wasn’t built, and then have to spend another day and a half compiling it again with the correct USE flags. Or to use the wrong stage file on the first try, or realize OpenRC won’t work as an init system for a specific use case, or having Grub inscrutably be unable to find the installation. Also, don’t expect Gentoo to be faster out-of-the-box than Debian or Fedora without a customization effort, either; for me Gentoo was actually slower than Debian in my benchmarks without a few kernel and package re-compiles. With enough persistence and research, though, it’s possible to squeeze every bit of processing power out of a computer this way.
Personally, I’m not sure I’m willing to go through the amount of effort to migrate my workstations (and especially my servers) to Gentoo because of how much extra configuration is required for often marginal performance gains thanks to the power and performance capabilities of modern hardware. Debian Stable will likely remain my workhorse for the time being for those machines, and I wouldn’t recommend anyone install Gentoo who doesn’t want to get into the weeds with their OS. But as a Linux hobbyist there’s a lot to be said for using other distributions that are a little more difficult to use than Debian or even Arch, although I’d certainly recommend using a tool like Clonezilla to make backups of your installation from time to time so if you do make the same mistakes I made in college you can more easily restore your system. For me, though, I still plan to keep Gentoo on my MacBook Pro since it’s the machine that I tinker with the most in the same way that a classic car enthusiast wants to keep their vehicle on the road and running as well as it did when it was new. It also lets me end forum posts with a sardonic “I use Gentoo, btw” to flex on the Arch users, which might be the most important thing of all.
Ah, memories of a Pentium III building the kernel for hours… only to realise I’d forgotten to build in file system support for ext3. Was powerful in that you could avoid unnecessary junk, and have optimisations for your hardware though – good for squeezing out performance (say, from a pentium III…). Nowadays I find nixos scratches that itch – you can customise builds (of any part!) a la Gentoo, but it’s nice to have the precompiled binaries. The rollback would have saved me so much time too back then! (plus having an simple text file you can rebuild from, which has “all the tweaks” you inevitably make).
Yep! System config for all the tweaks you always want, hardware config for the drivers, storage configuration, etc. It’s made me much happier about spinning up new systems or changing my environment (though the learning curve was a little brutal), everything is just fearless.
One time in the late 2000s, CLUG sent me 40+ emails inviting me to attend a talk on iptables.
I used Gentoo for a good while a couple of decades ago and that’s where I got a lot of my Linux knowledge from, but eventually I ditched it because it just wasn’t worth all the time it took to compile everything. Sure, one could make the stuff run faster than with the precompiled distros, but not that much faster that it even remotely made up for the wasted time twiddling my thumbs.
Haven’t felt the need to so much as look back after I ditched it.
I wouldn’t consider myself an advanced linux user, having had only Ubuntu experience before installing Gentoo. However, I should say that trying out Gentoo is worth it for multiple reasons. One is that the wiki is so well informed and so well written, that you will learn a lot about how an unix system works, if you’re a beginner like me. Secondly, that Gentoo wasn’t too hard to build if you didn’t pick the hardest option – which is ma de possible (as mentioned) by “distribution kernels”. Then comes the very satisfying liberty of accepting only the licenses you would agree with: Gentoo is one of the systems that will give you the most liberty of choice when it comes to software. Lastly, most issues that one may encounter are really well documented in the wiki aswell. Gentoo has been my daily driver for a while and I don’t have any issue. On modern computers, compiling times are generally reasonable, and a little patience is a good thing when we’re (too much) used to do everything fast. The only downside I found is that making an integrated graphic card and a dedicated nvidia graphic card work together and smartly switch seems near impossible and it is very hard to undersand how to. But so far I haven’t had any issue running everything on the nvidia. Most of the time, KDE only uses 8mb of VRAM. To my taste and in everyda use, this is a very achieved and very nice OS.
“it’s possible to do something like spend a day and a half compiling a kernel or desktop environment only to find out a critical feature wasn’t built, and then have to spend another day and a half compiling it again with the correct USE flags”
Last time I installed Gentoo, I used the kernel from an Arch box and put that on the machine, set up Grub and done. Then I spend the time to compile the kernel to make sure I could reboot back into a working kernel.
I am a Linux ‘user’ now… Not a ‘builder’. Rather be using Linux applications and just getting a task done. Compile/design my ‘own’ applications as well. I’ll leave the Linux underbelly to the younger generation :) .
We’re not talking “./configure && make && sudo make install” here, just “emerge -a www–client/firefox” and wait unless you want to change the default USE flags.
The younger generation is almost 100% clueless about the linux underbelly
oh booo hooo the youngins are sooo stupid unlike me when I was their age how will our civilization survive, god I hope I’m not like this when I’m old
Speaking of youngsters, I read a post over on a Linux forum about a ‘young’ and ‘motivated’ individual who is willing to help out in the kernel arena, but wanted to code using help from AI…. Makes me wonder :) :eek: ….
Depends on what you are doing. I had processes that took over a week to run. Gentoo could save me half a day or more on runtime (I tested it). I’d typically just emerge world at the end of the week to keep things up to date while I was at home.
Installing Gentoo is my favorite way of stress testing “underpowered” embedded devices for defects. Even a 100MHz ARM can compile world and if it can make it through the week without faults, I know the hardware is reliable. The ultimate goal is to have a minimalist system with the smallest attack surface and Gentoo offers that flexibility.
“Install Gentoo” 😎
https://www.youtube.com/watch?v=VjGSMUep6_4
My first linux experience was Gentoo. A friend printed out the entire manual for me, and provided me with floppy disks for the source. It took 3 days to compile. I succeeded in getting it up and running, but didn’t really know how to use it and quickly moved on to other things. I haven’t been back to Gentoo. These days my time is worth more than the freedom of configuration, so I stick to more well trodden paths like Debian and Redhat variants.
Arch is basically Gentoo without all the compiling. You can “measure” that however you want on social circle jerks, but unless you have some “exceptional” use cases, it seems to fly in the face of hacker ethos to waste time compiling when there are trusted binaries ready to go. Just my 2 cents. Happy hacking.
gentoo is definitely neat. i love the ability to build from source. really, debian gives me enough of that for my taste. ‘apt-get source xxx’. but gentoo definitely has a niche, and an allure.
but i don’t really understand all this talk about efficiency. small and old computers can generally run debian fine. you don’t need to rebuild anything from source. most reasonable programs use reasonable amounts of ram and cpu. a 2012 macbook is a powerful computer. even 15 years ago, 1GB of RAM was pretty standard, and 1GB is a lot of RAM.
you’ll wish you had a better computer if you run a modern browser. building from source won’t solve that problem.
i don’t really know what it’s like to use gnome but i imagine that makes you feel like your computer is too slow, too. and building from source won’t solve that problem either.
i feel like a lot of times people want to monkey around with the things that give you 1% or 0.1%, which can be fun, but really there’s no reason to. just don’t use gnome, don’t use modern browsers. that’s all it takes. my 2GB raspi 4b is swimming in unused memory!
I’ve played with Gentoo for a while a few years ago, but I didn’t find it too useful for my use-cases. Well, it might’ve been less of a struggle didn’t I choose to go with musl + clang, but what’s done is done, I guess. But it was quite ab interesting experience anyways.
And now I’m currently reasonably happy with nixos. While it doesn’t give you the same level of customization (e.g. you can’t go with openrc or musl), you still have plenty of control over what you have installed. And, perhaps more importantly, if you’re not satisfied with how the software provided in the repos is built, you can fiddle with it on a per-package basis via override and overrideAttrs (the most common use-case for me is pulling newer sources from git, but also I did occasionally add some patches).
Guix may be more interesting if you don’t like systemd while being able to tolerate lisp and having much less packages in the repos. Nix has pretty much everything one can need, while guix is a bit more nuanced due to both smaller user base and its devs being foss absolutists refusing to ship stuff generally accepted as useful to have, like cpu microcode updates. Although, given that can be dealt with via nonguix and friends, guix is a rather interesting distro to try out
I propose a billion dollar bounty for the first AI that can install and configure Linux on a PC. An additional billion if it has a desktop OS. And an additional billion if it can diagnose and fix broken installations. I am good for the first two bounties, waiting for someone to pony up the last billion. ;-)
Elon?
The article has an odd emphasis on wringing performance out of low-end machines. That’s certainly an upside, but the obvious downside is recompiling everything on low-end machines. (Of course there are solutions where you have a beefy machine cross-compile optimized binaries for your wimpy machine, but that’s advanced even for gentoo.)
I’m not convinced that low-end performance is really gentoo’s sweet spot at all. For me, the big attraction is nothing to do with performance, but the near-zero friction in customizing packages. This is true across the range of customization options: toggling –with-foo flags to configure, cherry-picking a git version for a bugfix or feature that hasn’t been released yet, or applying a completely custom patch.
In my experience with other distros, some or all of these customizations are going to require opting out of the distro’s package, and adding it to your own parallel ports tree. Obviously some work is fundamentally required to define a custom build, but I’ve always encountered additional friction of telling the system to use your local version instead, and/or a separate step of rebuilding your custom packages into a local repository every time you upgrade the system.
(It’s possible my perspective is flawed; maybe some distros did have better tools to streamline local customizations, and I just failed to learn about them.)
Whereas in gentoo, there is practically nothing beyond the actual productive work of adding a patch, or copying and editing an ebuild. If there’s a per-package USE line in /etc/portage/package.use/, it gets applied automatically. If there’s an ebuild in my local repository, it automatically overrides the gentoo repository. And if there are patches in /etc/portage/patches/category/package/, they get applied automatically, too.
Because of this, ever since I started using Gentoo, I’ve tweaked many minor things that I wouldn’t have bothered with on other distros.
As an example, I recently yoinked the Unicode 16.0 commit from glibc’s git, and added it as a patch against the current release (2.40) for those sweet Symbols for Legacy Computing Supplement glyphs.
Once I verified the patch applied cleanly to the release, the whole interaction with the system was just:
#mkdir -p /etc/portage/patches/sys-lib/glibc-2.40
#cp Unicode_16.0.patch /etc/portage/patches/sys-lib/glibc-2.40
#emerge -a1 glibc
And when glibc-2.41 is released and stabilized in a few months, I won’t have to take any action at all to retire the now-obsolete patch — an ordinary upgrade will build and install the new version, ignoring the mismatched patches directory, and I’ll be back to vanilla.
Emerge and local overlays are what i miss everywhere else. “Ohh this patch fixes my issue” is super easy ro do in a way that doesn’t break everything. USE flags for disabling functionality I don’t need to save space and compile time is also nice.
I need to give it a try now that they have binpkgs available.