BSD vs GNU/Linux – Main Differences Between BSD and GNU/Linux Userland

bsdgnu

I've read a lot on Unix & Linux about BSDs and GNU, etc. But I still don't understand what some actual, practical differences are between BSD and GNU userlands, despite the fact that they are often mentioned. Can someone elaborate?

When answering, please fully explain historical connections, keeping in mind that I haven't been alive long enough to have experienced a time when GNU/Linux was not the mainstream UNIX (excepting OS X).

Best Answer

The term "userland" can refer to many things in different contexts, but here I interpret "GNU userland" vs "BSD userland" as the default, minimum set of programs that come with a distribution.

The big main difference is that the two userlands start with completely different source code. GNU cat source code NetBSD cat source code. Just from that simple-in-concept program, you can see that NetBSD's cat uses traditional, single-letter command line flags. GNU programs tend to have single-letter flags, but also the --something-long type options. GNU programs also tend towards POSIX compatibility.

That difference in source code will lend the two userlands different behavior in some cases.

It also looks like NetBSD (at least) uses its own version of libc, the standard C library. I'm getting in over my head here, but libc and dynamic linking are strangely inter=related. Again, different source code will lead to different behavior.

I think that as a shell user, you'd find that ps would act different, and ls might give you slightly different output than you're used to. You'd have to find equivalent command line flags for some programs, if you use the --long-option type of command line flags.

Historically, my understanding is that BSD userland descends more directly from V6 and V7 Bell Labs Unix, via the 32V port to VAX hardware. GNU userland is newer, written at least somewhat in reaction to AT&T's attempts to keep code a closely guarded secret in the early 80s. After the 1983 Bell System divestiture, AT&T tried to "monetize" Unix. Part of that was to license the source code in a way that prevented most people from ever seeing it. Richard Stallman and others had problems with this. Their GNU project existed specifically to create a freely-shareable Unix-like system.

In the meantime, by 1993, AT&T sued the University of California system over the BSD ('B' is Berkeley, where University of California is located) systems. People at Berkeley had replaced all of AT&T's original source with new code, and that new code became the ancestor of at least NetBSD's userland. AT&T and UCB came to a settlement in 1994, revealed to the public in 2004.

Naturally, at least ideas cross-pollinate, so there's at least conceptual similarity between GNU and BSD userland, but corner cases definitely differ.

Related Question