Nice FreeBSD features

Reading time: 4 minute(s).
2025-07-26

If you come from the Linux world and you've never tried FreeBSD before, you should. This is a list of nice features FreeBSD offers that I kind of miss when I go back to my Linux desktop and servers.

My home-server is a raspberry running FreeBSD. This means a few things:

/etc/ and /usr/local/etc/, pkg, ports

FreeBSD makes a difference between what's in the base system, managed by freebsd-update, and what's a third-party package, installed via pkg. In most Linux distributions everything is packaged, kernel included, in FreeBSD the base system is tightly coupled and its files belong to /etc/ (and /bin/, share, and many more), while the ports/package collection and anything third-party goes into /usr/local/ (/usr/local/etc, /usr/local/share, etc..). This has a few benefits (see below) and makes managing configuration files a bit easier. The base system contains a surprising number of utilities, such as: clang (used as default Posix C compiler), grdc (Grand Digital Clock. This one is just cool.), primes, tcpdump, nc... you can check the full list here. The base system is always included when using bsdinstall, but you can configure freebsd-upgrade.conf to install only parts of it, although not recommended.

Commands have json output

Some of the commands in base have machine-readable input thanks to libXo, which means I can type

$ wc --libxo json /etc/motd
{"wc": {"file": [{"lines":21,"words":104,"characters":946,"filename":"/etc/motd"}]}}

Lo and behold, Json output without installing anything. This doesn't work with a lot of commands but when it does it works really well with jq:

$ wc --libxo json /etc/motd | jq '.wc.file.[].lines'
21
$ wc --libxo json /etc/motd | jq ".. | objects | .lines | values"
21

ZFS

zfs is an excellent filesystem and part of the FreeBSD Base. It's simple to use, very reliant, flexible, and offers deduplication, compression, and snapshots. It also works wonderfully with jails:

Jails

jails are FreeBSD containers, analogue to LXC/LXD in Linux. When making a thin jail on FreeBSD, most of the base system is only stored once, and then mounted in each jail, enabling them to share most of the "immutable" base system. If dedup is on for the two jails, two files in different jails are going to be stored just once even if they're not part of the base system, and if you modify a file only the modified "chunk" will be written to disk. This is all to say that creating a new thin jails almost take no extra space on ZFS, which is the neat part of it. ZFS also allows you to take a snapshot of a jail that you can restore later, or use it to simply clone a jail.

To manage my jails I use BastilleBSD, which is nothing but a collection of shell scripts and wrappers around FreeBSD commands, like zfs, jls, and more mentioned above. Bastille makes everything mentioned above very simple, even limiting the jail's resources (using undocumented bastille limits)

More??

This list could be updated in the future. I am aware there are lots of advanced FreeBSD features I have barely ever used. You can contact me for feedback and suggestions at the about page below,

top↑ end↓