Jay Taylor's notes

back to listing index

What are the main differences between BSD and GNU/Linux userland? - Unix & Linux Stack Exchange

[web search]
Original source (unix.stackexchange.com)
Tags: os-x linux unix bsd userland operating-system unix.stackexchange.com
Clipped on: 2014-02-14

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.