You may have heard of “Gentoo Linux”, a bare bones minimalist Linux distribution known for being hard to use and one of the hardest distributions to install (with maybe the only exception being Linux From Scratch). In this post I’m going to show you what Gentoo Linux is like on the inside, and hopefully encourage you to try it for yourself!

Benefits of Gentoo Learning Experience

USE flags

Minimal, lightweight, and fast

Rolling Release

Secure

Configure your own Kernel

Highly customizable

Compile from source! (Or use Binaries)

Both Stable and Modern “Bleeding Edge”

Slotting & Multiple versioning

Runs on variety of architectures

User patches & Overlays

You can be an El3t3 H4ckz0r Downsides of Gentoo First time install is time consuming

Compiling from source takes a while

Portage is slow

Cryptic error messages

Updates can cause conflicts/breakage (not hard to fix usually)

Must do things normal package managers would do for you.

Seriously Why do people think I like watching things compile?

Troubleshooting is more challenging: Always check USE flags!!!

Couldn’t do screen recordings without high quality mic

The first time I installed Gentoo it took me Three Tries, and over a week to install, but I was a computer noob, and had no idea what I was doing or how to learn. Once you finally get the base system installed, all you get is a command line. You still have to setup & install your USB devices, Desktop environment, WIFI, Sound (Alsa), and EVERYTHING you take for granted. You even have the recommended option of configuring your own kernel.

Installing & Using Gentoo is a Great learning experience. The amount of time it takes to install is the biggest hurdle, so just do it in small chunks. Spend about 20-30 minutes a day on installation instead of spending an entire weekend on installing a linux distro, just make sure you leave your computer on.

You’ll probably learn a lot even if you’re coming from a distro like Arch or Slackware. That said, the documentation is so good even a beginner might be able to get through the install (assuming they have a desire to learn and research). The first install is the hardest; A second or third install may only take a couple hours + Compile time.

Documentation is Fantastic

The documentation in Gentoo is extremely good. It usually tells you exactly what you need to know. It will tell you which kernel modules you need to add, which USE flags to add, and provide a step-by-step process to installing, updating, or troubleshooting your computer. Gentoo is what taught me how to effectively read the documentation. I was a beginner when I first installed Gentoo, and I managed to struggle my way through it–with a little help–and the answers were always right in front of me when I opened my eyes to see them.

Not only is Gentoo’s documentation great, but the information typically applies to other distributions as well. If you’re an Arch user sometimes answers can be found in the Gentoo Docs and vice versa. (Arch is also known for having extremely good documentation)

Great Learning Opportunity

The biggest thing I learned in Gentoo was how to learn on my own. Not just reading the error, but understanding it. Closely reading the documentation, the importance of researching terms I don’t understand, etc… I also got a general idea of how kernels work with the different drivers, cards, etc… and a more thorough understanding of how Linux, and computers in general work. I even configured my own kernel!

I only have limited experience with Arch and Slackware, but I know they’re also great learning opportunities. I went straight from Mac, to a week of Ubuntu, and then straight into Gentoo. What I can say is that everything you do in Gentoo is an opportunity to learn something new about your computer. Once you get comfortable with Gentoo it doesn’t take that long to install/update your system. Some people argue it’s easier because you know your system so well. Crazy people in this world.

Rolling Release

Windows 8, Windows 10, Ubuntu 16.04? With the “Rolling Release” cycle of Gentoo, Arch, and Kali, you don’t have to wait for the latest updates. There’s no such thing as Gentoo 10. You can pull the latest software & kernel updates into the Portage tree any time you want so you always have an up to date and secure system. No clean install necessary.

Gentoo has also been very stable in my experience. I’ve rarely, if ever had any breaking changes. That said, if you want more “bleeding edge” software, you can add those either through overlays, or by appending ~amd64 in your package.accept_keywords.

Friendly, Helpful, & Active Community

The community in Gentoo is small, but active. You can almost always get help in the #gentoo IRC channel, or on reddit.com/r/gentoo, but this is Gentoo. You’re supposed to read the manual, and research things you don’t understand. If you ask a question with an obvious answer, expect to get a link as an answer. Read the errors, understand the errors, do your research, and be respectful of peoples time. Most of the people helping out are volunteers, and don’t owe you anything.

I’ve found Gentoo users to be noob friendly, and helpful. The community is one of the best things about Gentoo.

Portage (Compile everything!)

Portage is an awesome package manager. It’s based off of BSD’s “Ports”. Portage compiles everything from source, and allows you to set USE flags for every package, and helps you manage all of your software and kernel updates. You can even take a machine that is years out of date, and Portage can make the software brand-new without the need of a fresh install.

Slots & Multiple versions

Slots allows you to have multiple versions of the same software installed on your system at any one time relatively easy by installing different versions in different slots. I haven’t done much with this, but it’s there for the people who are way smarter than I am and have a use for this kind of thing.

Use Flags

Use flags allow you to enable or disable certain features of a package. Why are USE flags neat?

1. They help you reduce the amount of dependencies a package relies on, or give you more features in the package that aren’t available by default.

2. Gentoo is already a lightweight, fast, minimal distribution. With USE flags, you can make it even more lightweight, fast, and minimal. I don’t need half the USE flags on most packages, so why have all that extra bloat?

3. Control. You get near absolute control over your system with USE flags, and because Gentoo compiles everything from source. There’s also the choice between Systemd and OpenRC (but that’s not really a USE flag thing)

4. Theoretically Gentoo is more secure. Less code & less software = less vulnerabilities. But I’m not a security specialist, so I’m just taking others word for this.

5. I like to know my system. I enjoy the process of learning, and USE flags give me something extra to play with (another reason to yell at my computer).

Let’s take a look at the USE flags available to Emacs.

You can see the flags listed in RED have been set, and the flags listed in Blue are not set. As a Gentoo user, YOU get to choose what you want to have on your system. Let’s say we want to install Firefox. We can see which USE flags come by default, as well as any dependencies that Firefox relies on.

How do you actually set USE Flags?

Use Flags Manual Page

You can set USE flags “Globally” or per package. If you wanted every package to use ALSA (sound), then you can set the USE flag globally. Otherwise you have to manually set the Flag if it doesn’t come by default.

Setting a USE flag globally can be done in the /etc/portage/make.conf file, with the USE=”” variable.

# These settings were set by the catalyst build script that automatically # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. CFLAGS="-O2 -pipe" CXXFLAGS="${CFLAGS}" # WARNING: Changing your CHOST is not something that should be done lightly. # Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing. CHOST="x86_64-pc-linux-gnu" # These are the USE and USE_EXPAND flags that were used for # buidling in addition to what is provided by the profile. USE="-kde -qt4 -qt5 ldap" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" PORTDIR="/usr/portage" DISTDIR="${PORTDIR}/distfiles" PKGDIR="${PORTDIR}/packages" MAKEOPTS="-j5" VIDEO_CARDS="radeon" INPUT_DEVICES="evdev synaptics" PHP_TARGETS="php7-0"

This system REMOVES kde, qt4, and qt5, for every package, and adds ldap, UNLESS you’ve overwritten these changes with a local use flag.

If you want to add a use flag locally, you can do that in the file /etc/portage/package.use. I’m not sure if this is a proper way to do this, but I’ve turned package.use into a directory so I can organize my use flags a little.

At the top of the command line you see me listing out the files in my package.use directory. Below that I’m just printing the contents of each file. These files are just USE flags for different packages.

Downsides of Gentoo

With all of the choice, speed, and power that comes with Gentoo Linux, there are a couple downsides:

Portage makes you do more stuff: See that image of the Firefox install? That particular install requires a USE flag change. You can copy/paste that use flag into the package.use, or have Portage do it for you. But then you need to use “dispatch-conf” to accept the edits that portage made. Typically package managers handle all this behind-the-scenes gunk, but Gentoo makes you do some of it.

Emerge/Portage is slow:Not a huge deal because I only update my system about once a week. It can take time for Portage to sync the tree and pull all the updates, and OH MAN compiling Chromium takes hours. But… I have a life (kinda) and I don’t sit there and watch code compile all day. I go outside or sleep, or put the updates in the background and it’s business as usual.

Troubleshooting more challenging sometimes: Troubleshooting Gentoo is tough sometimes. Especially if your getting help for something that doesn’t seem like a Gentoo problem. I was having encoding problems in Emacs, and after 4 hours I realized I needed the XFT Use flag. ALWAYS CHECK YOUR USE FLAGS KIDS!

Needed high quality mic for screen recordings: Maybe I’m just a n00b, but I couldn’t get my built in Mic to have quality sound in Gentoo, despite working fine in Windows, and my crappy Logitech sounding great on my Mac. No matter what there was some nasty popping sounds and static and fuzz, and.. yuck. That’s okay though because I bought a beautiful “Yeti Blue” Mic and it’s amazing.

Cryptic Error Messages: While Portage is great, and can handle MOST issues on its own, sometimes it needs a little help. The error messages can be cryptic. They make sense for the most part if you just…. you know actually read them… But a lot of times it’s like Huh??? Wtf do I do with that? *Furiously searches Google* Here’s two examples:

This error basically says that there’s a package called “x11-base/Xorg-server”, and some other packages need version 1.19.3, but 1.19.3 is trying to be replaced by 1.19.5.

Here’s another example of a potentially difficult message. This happened to me when trying to install Qute browser, a VIM-like web-browser:

Colors are so pretty 🙂

In a way I actually enjoy the troubleshooting in Gentoo. It forces me to be more patient, and to READ the documentation closely and really really pay attention and research, and cautiously experiment. I think this type of mentality makes me a better developer, and carries over to other aspects of my life. If you don’t learn patience, your head will explode like a zombie in the Walking Dead.

Gentoo VS Arch: Choice vs Simplicity

Gentoo and Arch share a lot of similarities. They are both super lightweight, flexible, fast, and minimal systems. They are both Rolling Release, “Do-it-yourself” distros built from the ground up, and both have fantastic Documentation and active communities. The main difference is that Gentoo is primarily a Source based distribution, meaning you have near complete control over what gets put on your system. All packages and software are by default compiled from source via the package manager (Portage) which provides all of the benefits listed above, and much more. Arch Linux uses Pacman, which installs software from binaries. By installing from binaries, you sacrifice *some* flexibility and choice that comes with a source based distro in exchange for Simplicity. Wait what!? Why does Gentoo’s logo look like Arch’s package manager name “Pacman”?!

Technically You can compile software from source in Arch, just like you can install binary packages in Gentoo, but it’s not what the distributions were meant for. Another difference is the communities. Gentoo is small, but very active, and more friendly In my experience. Most Gentoo users won’t shit on you for asking how to use proprietary GPU drivers. In my limited experience with Arch, I tend to run into more elitism. That’s nothing against Arch itself, and I shouldn’t hold it against them. Both Arch AND Gentoo are advanced systems that give you a sense of pride. Arch will banish the n00bs! Both Arch and Gentoo are great Linux distributions.

Conclusion: Gentoo is Wonderful

I’ve just barely scratched the surface. Gentoo is a great way to learn about how your computer works. It’s about as “Do-it-yourself” as you can get while still having a Package Manager. If you like learning, and you enjoy minimal, fast, flexible, and secure systems then Gentoo is a great option to consider. The learning curve is steep, but once you understand Gentoo it doesn’t take THAT much effort to use it. I’ve been using it as my every day machine for over a year. I have just about complete control over my system, and I encourage you to try it for yourself! Even just installing Gentoo Linux is a rewarding experience.

What kind of system/distro do you use, and why? Let me know in the comments, even if your a Windows or Mac user!