I have been running FreeBSD 11-STABLE for some time, though I felt I need to switch to a GNU/Linux environment again. It so happens that we use CentOS 7.2 at work. In addition, FreeBSD is unfortunately not well suited for handling multiple Python versions with unusual libraries. Therefore, I needed something for developers, though not overloaded with fluff like Fedora (yet it would play perfectly with the CentOS environment at work). At this point, I considered either Arch Linux or Gentoo. After running Arch for a short while, I realized I’m a “tweaker” by nature. That’s what let me enjoy the FreeBSD Ports tree so much after all. The minimalism of Arch Linux is great, though tweaking comes with a price of having to locally fork packages and track them with desired features. Therefore, I required something as malleable as FreeBSD in “Linux Land”.
What might be obvious by now, I chose Gentoo. Thanks to my Bash scripts and a pre-defined kernel .config, it took me merely an evening to get things running on a measly ASUS ultrabook (my current mobile FOSS machine). I then began to realize how much FreeBSD and Gentoo have in common and where they differ. I thought it might be useful to some if I share my observations. Especially, that there is the Gentoo/FreeBSD project for those of us who prefer a more Unix-like kernel, yet don’t want to part with the GNU userland.
First off, the Ports Tree I gently mentioned as my prime fancy earlier. What changed is that I started using ports-mgmt/portmaster on FreeBSD more extensively. In many ways it’s similar to Gentoo’s Portage. The make.conf file for global configurations is present in both Unix-like operating systems as well, though it differs in purpose and syntax obviously. I believe the biggest difference, however is that FreeBSD flags need to be tracked on a per package basis, while Gentoo heavily relies on more centralized settings. Regardless, FreeBSD has a slight advantage by providing pre-built binary packages for most ports, unlike Gentoo. Sometimes building software from source can be annoying, specifically when the builds fail for reasons we cannot control.
Secondly, one can run Gentoo in a FreeBSD way – as a server and/or local distribution system. Portage has built-in software distribution features, while FreeBSD offers ports-mgmt/poudriere for that purpose. Where Gentoo falls short is FreeBSD’s jails, bhyve and outstanding firewall solutions (PF and IPFW). No wonder, though. “True” Unix-like operating systems, namely Solaris and the BSDs had these features integrated early on. GNU/Linux is just now experiencing a renaissance of container technologies and virtualization. Furthermore, ZFS on Linux still has some licensing issues which prevent clean kernel integration. For that reason alone Solaris/OpenIndiana/Illumos or FreeBSD are better picks in terms of extensive data storage.
Thirdly, Gentoo and FreeBSD share some BSD and GNU utilities, though that’s more an aspect of the open-source community, than either of the systems. Let’s face it, FreeBSD belongs to the Unix-like BSD world, while Gentoo is a GNU/Linux distribution. However, it is feasible to reproduce the FreeBSD “feel” in Gentoo to some extent. For instance, we can try to rely on as many BSD tools as possible. Also, GCC can be replaced with Clang for software builds if one so prefers. I am actually eager to test this in a Linux LXC container or a simple chroot environment soon.
Looking at the discussed point again, I’m beginning to wonder whether choosing a GNU/Linux distribution as my primary OS was such a good idea. Probably not, though as in the case of Debian earlier, it’s a matter of use scenarios. Gentoo gives me the flexibility and hardware+software support I need on mobile devices. Also, similarly to FreeBSD, it is extremely “sane” and values stability over Arch’s bleeding edge. I guess I will bear with the long compile times somehow, though on a proper workstation I would much prefer to run any of the BSDs instead.