Choosing between OpenBSD and FreeBSD

Published on 2020-02-07. Modified on 2023-10-20.

A question I frequently get asked is how you choose between the operating systems OpenBSD and FreeBSD. In this small article I'll try to answer that question.

As with any tool, the first question you need to answer is what kind of problem you're trying to solve. This comes before any personal preference because even though both OpenBSD and FreeBSD are general purpose operating systems, they are not equally suited to solve every problem.

If for example you're building a storage server and you need a really resilient filesystem with focus on data integrity and protection against silent data corruption then FreeBSD is the only choice because it has ZFS and ZFS hasn't been ported to OpenBSD, and most likely never will, and the FFS2 (Enhanced Fast Filesystem), which OpenBSD uses, doesn't provide the integrity features ZFS does. OpenBSD's FFS2 is very resilient, but it doesn't solve the same problems as ZFS does.

If you need a very performant filesystem, or you need extremely fast networking, then FreeBSD is also the correct choice because OpenBSD's filesystem and networking stack is not as fast as the options FreeBSD provides.

If you're building a system with a heavy focus on security then OpenBSD is the much better choice as it has a ton of security mitigations build into the operating system. Not only that, the code always undergoes very critical security auditing and the base system includes a great number of applications that have gone through the same auditing. Likewise a number of the third-party software components (from X.Org Server and downwards in the list) comes with OpenBSD-specific patches for increased security.

One of the main project goals of OpenBSD is to be the number 1 most secure operating system in the industry and it always runs in a Secure by Default mode.

This doesn't mean that FreeBSD isn't suited to run as a firewall or a secure server, but FreeBSD hasn't got as many mitigations as OpenBSD has. And there isn't as heavy a focus on security in FreeBSD as there is in OpenBSD. However, this also means that OpenBSD is often slower than FreeBSD with regard to issues that get affected by security mitigation techniques.

If you need access to a large amount of third party applications, then FreeBSD has more than four times as many applications in the ports and packages system than OpenBSD does. Furthermore, the packages on FreeBSD are "bleeding edge" if you run with the configuration option latest for pkg. On OpenBSD you need to run the current branch in order to get "beeding edge" packages. Another really nice thing about FreeBSD is that it maintains a clear separation between the base system and third party applications. This e.g. affects where the configuration files of third party applications are located. FreeBSD base system configuration is located at the /etc directory whereas the /usr/local/etc directory contains all the configuration files of the applications installed on the system through the ports collection and packages.

If you need a desktop system for your daily browsing the Internet, reading email, watching the occasional YouTube video, then both systems have a lot of window managers and desktop systems and both will serve you well. In this case it's more a matter of whether your hardware is supported well enough, such as your GPU, Wi-Fi, etc., and personal preference with regard to package management and security updates.

The best thing to do is to try and determine exactly what your needs are and then test both systems to see which best fulfill those needs. If both seem to fulfill your needs equally well, then look into secondary issues and compare those. If for example your main requirement is a desktop system and both systems work great for you, then you could look into how much security mitigation you need on your system. Perhaps some of the third party applications you need is only present on one of the systems, or perhaps only FreeBSD has the latest edition of that third party application. Again, maybe you have a modern NVIDIA GPU in which case OpenBSD will not work at all.

Even though OpenBSD and FreeBSD share a common ancestry, and even though both systems are fantastic UNIX-like operating systems, there is a big difference between them. FreeBSD provides a lot of tuneable options for the kernel, the filesystem, and the network, that aren't present in OpenBSD. Furthermore, due to the tight integration with ZFS, FreeBSD also supports automatic boot environments, and it has Jails, DTrace and bhyve.

In the end both systems can solve many of the same problems, but the way they do that is different, and the best way to determine which system suites you needs best is to try them both out.

In my other articles, OpenBSD is fantastic, FreeBSD is an amazing operating system, and Technical reasons to choose FreeBSD over GNU/Linux I have shared many of the reasons why I think both of these operating systems are great.