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).

1 Answer
1

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 codeNetBSD 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.

so does that tend to be it for practical shell usage? long flags and corner cases?
–
strugeeJun 14 '13 at 2:55

8

My experience is also that GNU takes scalability more seriously. Maybe that counts as "corner cases" as well, but it's very frustrating indeed when your sed chokes on long input lines or your grep segfaults on binary data.
–
tripleeeJun 14 '13 at 5:55

one big difference is, that GNU never had his own Kernel while BSD based and build up on their own kernel, which, in parts, is widely used in commercial unix systems. MAC OS X uses Darwin as a BSK based Kernel for example.
–
visualicationDec 6 '13 at 17:19