Question About *Nix Systems

I'm a complete and utter newb when it comes to discussing the architecture of *nix systems, so please bear with me.

I've been thinking lately... Linux is essentially a rip-off of a Unix kernel. It's interface should be identical, so why aren't Linux and FreeBSD (an actual version of Unix*) distributions directly compatible with each other? Theoretically it should require more or less zero work to do so, since they expose a common interface.

...Is it because of a failure to stick to the interface? Did something similar to how the romantic languages split up, where the dialects slowly developed into completely separate languages due to isolation?

*: Technically BSD doesn't have any original UNIX code anymore, but that's because it was all rewritten.
Last edited on
Because Linux Is Not UniX.
Linux was a hobby project to be a free UNIX like OS. AFAIK it shares no code with the original UNIX.

so why aren't Linux and FreeBSD (an actual version of Unix) distributions directly compatible with each other?
Compatible in what sense?
nakaru9333 wrote:
Because Linux Is Not UniX.
Linux was a hobby project to be a free UNIX like OS. AFAIK it shares no code with the original UNIX.
I think you misread what I said. I'll explain it in my response to the next quote.

Compatible in what sense?
I wasn't saying that Linux shares any source code with BSD. I'm saying that since it's technically a clone (it provides the same interface), the kernel should in theory be able to be swapped out with a FreeBSD one, or the other way around. It has nothing to do with the underlying implementation of the kernels. It's the same principle with a graphics API like OpenGL. The drivers are implemented separate from each other, but a program written to use the interface (should) be able to run perfectly as long as the driver conforms to the specification.
Last edited on
Oh, I see. Is it vastly different? Is it similar enough to be able to swap out the kernels with a reasonable amount of work?
I would imagine it would take at least re-compiling the core system. There is a project to port the OpenBSD userland to Linux https://github.com/chneukirchen/obase
Can we forget ancient history for a moment? Today (and for many years actually), Unix is a part of POSIX, which is a standard, a document (just like C++, for that matter), which defines a set of APIs, command line utilities, etc. Various operating systems implement some or all of Unix.

Just like few if any today's C++ compilers share any source code with CFront, few if any Unix operating systems share any source code with the very first Unix
Last edited on
Why was NoXzema's comment deleted?

Can we forget ancient history for a moment? Today (and for many years actually), Unix is a part of POSIX, which is a standard, a document (just like C++, for that matter), which defines a set of APIs, command line utilities, etc. Various operating systems implement some or all of Unix.
So I imagine it would take plenty of work considering Linux isn't completely POSIX compliant (I'm assuming that the BSDs are, but I'm not sure).
I deleted it because I didn't care to spend the time to give a non-half-baked answer on why kernel drivers aren't very portable.

That said, the interface to user applications has various standards and actually pretty stable with minor modifications required here and there. You can actually write portable drivers using libusb or whatever corresponding library to the hardware interface you want, given that the OS supports it.

EDIT: tldr; Applications depending on POSIX between *BSD and Linux tend to work out of the box with usually no modification.

However, there are some things to consider like the use and advantages of epoll compared to the POSIX alternative.

^ half baked answer, ran out of time, same reason I deleted first post, hate rushing.....
Last edited on
closed account (z05DSL3A)
If you want to scratch your head a bit, Mac OS X is UNIX.

What is UNIX®?
http://www.unix.org/what_is_unix.html

Edit:
Also
Differentiating UNIX and Linux
http://www.ibm.com/developerworks/aix/library/au-unix-difflinux.html
Last edited on
IMO it was a great post, much better than what I can do when I rush (which is unfortunately 80 percent of the time :P ). Thanks, it was pretty informative.

Thank you as well Grey Wolf, those sites were extremely helpful.
Last edited on
Topic archived. No new replies allowed.