Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

... and what are the differences between them? I formulated my question like this to make it clear I'm not interested in a flamewar of opinions, rather in an objective comparison between the different flavors of BSD Unix. Ideally I could get feedback from users who have experience in all of them.

Background

I recently discovered that there's much more to Unix than merely Linux. I use Solaris at work, it opened my eyes. Now I'm interested in new unices, I want to try a new one and I'm naturally curious about BSDs.

The problem

I'm not asking for advice or opinions on what BSD to install; I want to know the differences (and common points) between them so I can make up my own mind. The problem is that it's difficult to get proper comparisons between them.

If you're lucky, you get some hasty definition like this one:

FreeBSD = Popular all-rounder.
NetBSD = Portable (runs on a lot of platforms, including a toaster)
OpenBSD = Security above anything else.

(It might be true, but it's not really useful. I'm sure FreeBSD is portable and secure as well ...)

If you're unlucky you get caught in one of those inevitable Unix legends about projects splitting, forking, rebranding on intellectual/moral grounds, how Theo de Raadt is an extremist and how MacOS X and FreeBSD had a common ancestor over 20 years ago.

Fascinating, but not really informative, is it?

The BSDs

The BSDs I am interested in are:

  • FreeBSD
  • OpenBSD
  • NetBSD

and optionally

  • Dragonfly
  • Darwin
  • ...

My questions

In order to understand the differences better, here's a list of somewhat related questions about the different distributions (can we use this term?). If you present your answer under some form of tabular data, you are my all-time hero!

  • Do they use the same kernel?
  • Do they use the same userland tools? (what are the differences, if any?)
  • Do they use the same package/source management system?
  • Do they use the same default shell?
  • Are binaries portable between them?
  • Are sources portable between them?
  • Do they use different directory trees?
  • How big are their respective communities? Are they the same order of magnitude?
  • How much of the current development is common?
  • What are the main incompatibilities between them?

I don't know how easy those questions are to answer, and how relevant to the StackExchange format this question really is. I just never came across a simple document listing the differences between BSDs in a clear way, useful for fairly experienced users to look at and make a choice easily.

share|improve this question
10  
This is a great question, +1 –  MaxMackie Feb 3 '12 at 12:34
3  
I was 100% certain the toaster thing was a joke... embeddedarm.com/software/arm-netbsd-toaster.php –  tkbx Jan 10 '13 at 14:18
    
haha well it was just a demo. I like how the burnlevel seems to be above 200% on the display screen. –  Aki Jan 11 '13 at 23:46
add comment

2 Answers 2

up vote 31 down vote accepted

I don't think I will provide you and everyone with the perfect answer, however, using a BSD system everyday for work, I am sure I can give you a useful insight in the BSD world. I didn't ever use NetBSD, I won't talk a lot about it.

Do they use the same kernel?

No, although there are similarities due to the historic forks. Each project evolved separately.

Do they use the same userland tools? (what are the differences, if any?)

They all follow POSIX. You can expect a set of tools to have the same functionality between *BSD. It's also common to see some obvious differences in process/network management tools within the BSDs.

Do they use the same package/source management system?

They provide a packaging system, different for each OS.

Do they use the same default shell?

No, for example FreeBSD uses csh, OpenBSD uses ksh.

Are binaries portable between them?

No:

(XXXX@freebsd-6 101)file `which ls`
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 5.5, dynamically linked (uses shared libs), stripped

They don't really support stable and fast binary emulation. Don't rely on it.

Are sources portable between them?

Some yes, as long as you don't use kernel code or libc code (which is tied up tightly to the OS) for example.

Do they use different directory trees?

No, they are very similar to Linux here. However FreeBSD advocates the use of /usr/local/etc for third party software's configuration files. OpenBSD puts all in /etc... They put all third party in /usr/local, whereas Linux distribution will do as they see fit. In general you can say that *BSD are very conservative about that, things belongs where they belongs, and that's not something to make up.

How big are their respective communities? Are they the same order of magnitude?

FreeBSD's is the largest and most active, you can reach it through a lot of different forums, mailing lists, IRC channels and such... OpenBSD has a good community but mostly visible through IRC and mailing lists.

Actually if you think you need a good community, FreeBSD is the way to go. NetBSD and OpenBSD communities are centered around development, talk about new improvements etc. They don't really like to do basic user-support or advertising. They expect everyone to be advanced unix users and able to read the documentation before asking anything.

How much of the current development is common?

Due to really free licenses code can flow among the projects, OpenBSD often patches their code following NetBSD (as their sources have a lot in common), FreeBSD takes and integrates OpenBSD's Packet Filter, etc. It's obviously harder when it comes to drivers and others kernel things.

What are the main incompatibilities between them?

They are not compatible in a binary form, but they are mostly compatible in syntax and code. You can rely on that to achieve portability in your code. It will build or/and execute easily on all flavors of BSD, except if your going too close to the kernel (ifconfig, pfctl...).

Here's how you can enjoy learning from the BSD world:

Try to replace your home router with an openbsd box, play with pf and the network. You will see how easy it is to make what you want. It's clean, reliable and secure. Use a FreeBSD as a desktop, they support a lot of GPUs, you can use flash to some extent, there's some compatibility with Linux binaries. You can safely build your custom kernel (actually this is recommended). It's overall a good learning experience. Try NetBSD on very old hardware or even toasters.

Although they are different, each of them tries to be a good OS, and it will match users more than situations. As a learning experience, try them all (Net/Open/Free), but later you might find yourself using only 1 for most situations (since you're more knowledgeable in a specific system or fit in more with the community).

The other BSDs are hybrids or just slightly modified versions, I find it better to stay close to the source of the software development (use packet filter on OpenBSD, configure yourself your desktop on FreeBSD, ...).

As a personal note, I'm happy to see an enthusiast like you, and I hope you will find a lot of good things in the BSD world. BSD is not about hating windows or other OSs, it's about liking Unix.

share|improve this answer
3  
Scrolling down I was sure this was a Gilles answer. Thanks for a great answer though Aki! –  MaxMackie Feb 3 '12 at 15:05
2  
@MaxMackie - I know what you mean, I was thinking the same thing! :-) –  Chris Down Feb 3 '12 at 15:09
2  
Haha I'm not really active here so I don't know who is Gilles, but I am looking forward to reading his answer! –  Aki Feb 3 '12 at 15:12
1  
A big thank you for a great answer! I particularly enjoyed the last part. I just installed FreeBSD on a virtual machine. Let's see how it goes ... –  rahmu Feb 5 '12 at 17:22
4  
+1 for the last sentence. But I wish I could +2 for the whole –  Shiplu Dec 16 '12 at 0:31
show 4 more comments

(I can't give a complete answer, but I also can't turn away from this question, so...I'll just address some points...FreeBSD was the most used BSD (in 2005), so I try to offer some clues regarding "the others".)

  • First of all, you're right to dismiss the one-line explanations, OpenBSD's motto is "free, functional and secure" and the NetBSD developers also strive to create a functional system.
  • binary compatibility: You can apparently run FreeBSD binaries on NetBSD (which I've never tried). This is the only form of binary compat between the BSDs I know of (apart from NetBSD's and FreeBSD's (limited) Linux binary compatibility).
  • ports: NetBSD and DragonFlyBSD's ports use pkgsrc, OpenBSD's are here, FreeBSD's here. You can refer to that to compare available packages. The respective ecosystems are similar but not identical.
    • pkgsrc stands out as it is made to be portable, i.e. you can use it with Minix 3 or Linux, too. Therefore, there's non-BSD interest in it and (maybe as a consequence) there are more ports. pkgsrc-wip makes it easy to contribute.
  • NetBSD recently introduced a thorough Automatic Testing Framework (see also kyua) enabling them to run automated tests (and there's rump, making it possible to have kernel code tested in userspace). It's also got the thoroughest XEN support, I think. Departing a little from the "portability" quest, they introduced three tiers: "Focus", "Organic" and "Life Support". They also introduced Lua into the base system.
  • To catch the drift of OpenBSD, these "papers" (mostly nice slides) are a valuable resource and give you an insight about recent developments in OpenBSD.
  • DragonFlyBSD developed their own ZFS-contender, HAMMER, which apparently is much less memory-hungry (probably not as feature-complete, I can't tell).
  • I don't agree with @Aki on the lack of support with OpenBSD or NetBSD, looking at the mailing lists, both offer helpful communities -- have a look yourself -- being referred to a manpage is no offense.

Bottom line? Have a look around and give them a try. Using binary packages (usually offered with a binary release, i.e. not for snapshots from -current), it's not that much work to get a usable BSD system.

Edit You might be interested in their planets: undeadly.org for OpenBSD, blogs.FreeBSDish.org for FreeBSD and planet.netbsd.se for all of them (down at the moment (?))

share|improve this answer
3  
Nice answer. I think there's so much to tell, it would deserve writing a paper. I didn't mean to say OpenBSD community is not helpful. I did some research about binary compatibility, there's more: netbsd.org/docs/compat.html and compat_linux on OpenBSD. Apparently Open used to have freebsd binary compat: nixdoc.net/man-pages/OpenBSD/man8/compat_freebsd.8.html. As you stated, it's limited and I wouldn't rely on it. –  Aki Feb 3 '12 at 16:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.