This page may be out of date. Submit any pending changes before refreshing this page.
Hide this message.
Quora uses cookies to improve your experience. Read more

Is Mac OS X essentially built on top of Linux?

Please explain BSD.

Answer Wiki

If operating systems were families, macOS and Linux would not be the same person. They wouldn't even be siblings.
They'd be cousins by adoption.

So, NO. macOS is not built on top of Linux

22 Answers
Dave Stagner
OSX is based on NeXTStep, the operating system for NeXT Computer, a company Steve Jobs founded in 1988 after he left Apple. NeXTStep was BSD 4.3 Unix implemented on a Mach microkernel. When Apple bought NeXT and made Jobs the CEO again, he brought in the NeXT team to fix the badly broken Mac 9 operating system, which used cooperative rather than preemptive multitasking and was not fully 32 bit. They effectively virtualized the old Mac OS, implementing the Cocoa layer to deal with the system calls that weren't 32 bit clean and hiding the old-fashioned multitasking inside virtual boxes.

So not only does the core of OSX predate Linux by several years, it was more technically sophisticated and advanced for a long time as well.
Jason Scott
Everyone else provided a sufficient reply about Mac OS X's origins.

This is just trivia about Apple's little-known previous UNIX OS -- A/UX.

In the late 1980's, Apple developed an impressively cool version of UNIX to run on certain Macs (iirc, the IIci was the first to be available with it pre-installed). A/UX was based on AT&T System V UNIX. As such, it carried a hefty licensing fee -- like $1500 ... and that was in addition to buying a $5000 Mac IIci loaded with a huge-for-its-day 80MB hard disk and a whopping 4MB of RAM.

As an implementation of System V UNIX, it could do all the usual UNIX-y stuff via a terminal window. But what was really cool was that Apple came up with the Mac OS Application Environment, which was essentially Mac OS Classic (System 7) in a virtual environment. MAE allowed A/UX to run classic Mac productivity apps like MS Word, WordPerfect, Excel, PageMaker, Quark, etc. and thus made A/UX the first "no-compromise" desktop-capable UNIX workstation. (HP, Sun and SGI UNIX systems were used on desktops ... by geeks ... but they lacked the traditional productivity tools that mere mortals would want for daily use.)

Had Apple been able to get the price of A/UX down to a reasonable level, it could very well have eliminated the need for Mac OS X later. But Apple's OS strategy in the early/mid-1990s was pretty messed up -- so it's doubtful that they would have polished up A/UX properly.

Sadly, A/UX was killed in late-1995/early-1996.

Apple used one other flavor of UNIX very briefly: IBM's AIX was the OS used on Apple's Network Servers in 1996-1997 ... which, interestingly enough, could not run Mac OS.

Ultimately, Apple's decision to buy NeXT to use NeXTStep as the basis for the next-generation Mac OS was the smartest move and resulted in Apple becoming what it is today (the good and the bad). Had it stuck with A/UX, Steve Jobs wouldn't have returned to Apple, there probably wouldn't have been an iPod, an iPhone, an iPad or any of the other products that have made Apple the highest-valued company in the world.
Ed Vielmetti
As to explaining BSD, I recommend this venerable text:

The Design and Implementation of the 4.3 Bsd Unix Operating System: Answer Book (Addison-Wesley series in computer science): Samuel J. Leffler, Marshall Kirk McKusick: 9780201546293: Amazon.com: Books

It's from 1989 so you can pick it up cheap, and it describes a simpler system than the BSD systems of today but one that is still recognizable and modern.

In the beginning, AT&T created Unix. Due to monopoly laws, however, they weren't allowed to sell it. A lot of organizations licensed Unix and made their own variants; most were commercial ventures, but the University of California at Berkeley made a noncommercial version, called BSD.

Meanwhile, Richard Stallman at MIT came up with an ideology of "free software"—more commonly called "open source" today—and started a project to create a "free" Unix-compatible operating system called GNU. Most of the GNU project went very well, but GNU Hurd, the core kernel component, was repeatedly delayed.*

A young programmer named Linus Torvalds stepped in, starting his own successful project to create a kernel called Linux. When combined with GNU's tools, Linux provided a complete operating system that worked just like Unix, but had been written from scratch and licensed in such a way that it would remain open forever.

Essentially, GNU and Linux are "knockoffs" of Unixes like BSD—very high-quality knockoffs, to be sure, but knockoffs nonetheless. All Unix variants—whether they're modifications like BSD or clones like Linux**—have small differences from each other; in practice, Linux is no more different than any other Unix variant.

That isn't quite the end of the story for OS X, though. Just as Linux adopted GNU's tools but threw out its kernel, Darwin (the Unix part of OS X) adopted BSD's tools but threw out its kernel.

So, to review:

Unix/Linux Family Tree

     +----------- Unix - - - - - -+
     | (modify)           (clone) | 
    BSD                          GNU
     |      (replace kernel)      |
Darwin/OS X                     Linux

If operating systems were families, OS X and Linux would not be the same person. They wouldn't even be siblings. They'd be cousins by adoption.

* Why? The theoretically "correct" way to design a kernel is called a "microkernel". In a microkernel, each component of the kernel is a separate program, all communicating with each other. If you want to access a file, you send messages to the file system component; if you want some memory, you send messages to the memory management component; if you want to make an Internet connection, you send messages to the network component. The problem is that this is much more difficult to design and build than the "monolithic" approach, where you build the whole kernel into one big component and allow programs to call into it.

Hurd was designed as a pure microkernel, based on a CMU research project called Mach. It has proven very difficult to implement, though—after 24 years of development, they're currently at version 0.5, which works but not very well. Linux, on the other hand, is a simpler, uglier monolithic kernel which worked pretty well from the beginning; most of the work since has been on expanding its hardware support, improving its performance, and adding new features.

Incidentally, BSD is a monolithic kernel too. Darwin's kernel is actually a weird hybrid—it uses the same Mach messaging that Hurd does, but all the kernel components are in one monolithic process. Mach is simply how programs communicate with the kernel and each other.

** If you want to be politically correct for no particularly good reason, pretend I wrote GNU/Linux here and elsewhere.

View More Answers