Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is Mac OS X developed on a licensed Unix or is it a Unix-like clone that, unlike Linux, conforms to Unix specification well enough to be registered as a Unix OS. Not until Leopard, Mac OS X did not gain the Unix certification. But in Leopard, Terminal still print:

GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)

But GNU is GNU's not Unix, and Mac OS X is registered as Unix. That gets me confused whether OS X is unix or unix-like.

In other words, is OS X written on top of Unix or a re-write of Unix that is as Unix as it can possible be. May be along the answer someone can provide lineage or other background information.

share|improve this question
What exactly is your question? A 2 year old discussion when dealing with OS X is not exactly the best source material. My understanding is the underline kernel is Unix everything else isn't. – Ramhound Jun 22 '12 at 14:48
what is unclear in my question? – KMC Jun 22 '12 at 14:52
Perhaps the fact you don't have a single ? in it? Which means there isn't a question in the body of your question. – Ramhound Jun 22 '12 at 14:53
@Ramhound The opening sentence is a very specific question albeit without the mark. – J.Money Jul 9 '15 at 15:14
@J.Money - The question at the time was not clear to me. I still maintain all questions, should specifically ask a question, which means a question needs at least single sentence with a question mark. If a question does not contain, a single sentence with a question mark, I am most likely always going to bring that complaint up. – Ramhound Jul 9 '15 at 15:16
up vote 3 down vote accepted

The original UNIX was created at AT&T. They made an OS to work on text processing, but couldn't sell it due to some restrictions they were under. Since they couldn't sell it, they were somewhat generous in allowing universities access to the source tapes. Several Unis made changes, with the most famous being the University of California at Berkeley, (a.k.a. UCB) which released changes as the Berkeley Software Distribution, or BSD. The BSD variant of UNIX made several important additions to what's called UNIX, including the Virtual Memory model, BSD sockets (think TCP/IP), vi, and CSH - the first shell designed for interactive use.

BSD UNIX had started as patches to the AT&T UNIX code. The Berkeley folks cleaned up and purged the AT&T code, and the AT&T-copyright-free BSD source was eventually released. This spawned 386BSD, which then spawned NetBSD, FreeBSD, OpenBSD, and FireflyBSD (and others). Eventually, the AT&T and BSD code bases were pulled into "Official UNIX" and this was called SVR4.

The MacOS X Darwin kernel is based on elements of NetBSD and FreeBSD, and also some Mach code. You can say that it's a UNIX, it has a code lineage through UC Berkeley all the way to the original AT&T.

But what does UNIX mean? Is it a lineage back to AT&T? If so, BSD qualifies, as does Solaris, and a bunch of others. Is it an API that you can run UNIX code on? Then those qualify, as does Linux which is a write from scratch to the UNIX api corpus. For most code, Cygwin would qualify as a target for UNIX code so its a UNIX also, even though it runs on top of the Windows kernel and the UNIX "kernel" is a DLL in user space. Is it a badge you can slap on your box? If so, Apple finally paid the cash for it in Leopard. Hmm, But Microsoft paid for that badge for the Windows NT4 POSIX subsystem. Yes, Windows NT was badged "UNIX" before Solaris was. Yet, NetBSD which is a direct descendant of UNIX sources, has never paid for that badge, and doesn't call itself UNIX.

As far as bash, I wouldn't use the GNU thing as a standard as whether Mac OS X is UNIX. bash is common on UNIX platforms (and IIRC having bash is one of the requirements for SVR4 UNIX) but can be ported to non-UNIX ones as well. The 'GNU's not UNIX thing' is more about the GNU Hurd, which was supposed to be a competitor to UNIX in the operating system space. The Hurd was supposed to be a microkernel that could do wonderful things as well as run UNIX code. The Hurd kernel hasn't done much, but having the Hurd goal has spawned a huge amount of incredibly useful software that runs on UNIX, including bash, emacs, gcc, and many others.

share|improve this answer
Wasn't SVR4 (or that era's POSIX spec) bourne not bash? – RedGrittyBrick Jun 22 '12 at 16:58
@RedGrittyBrick I think the "official shell" was /bin/sh bash shell. But the spec also required /bin/ksh, and I thought /bin/bash. I can't find any supporting docs though. – Rich Homolka Jun 22 '12 at 20:26
For SVR5 "The UnixWare shell is commonly called the Bourne shell" SVR4 acquired the Unixware name under Novell's ownership. – RedGrittyBrick Jun 24 '12 at 11:26

OSX is Unix simply because Apple paid for it to be certified, by The Open Group, as conforming to the Unix spec. The Open Group certified it because Apple actually put in the work necessary to make it conform.

I suspect only Apple know how much licensed AT&T Unix code, if any, remains in OSX, via it's BSD and other origins.

OSX may also include "userland" programs from GNU, such as bash. This doesn't make it any less conformant to the Unix spec. If you backported bash to SVR4, SVR4 would still be Unix.

share|improve this answer
You can al the OSX code that might be unix - the lower levels of OSX are Open Source see darwin for the code – Mark Jun 22 '12 at 16:06
@Mark: And what did you find when you looked? :-) ... According to Levenez OS X Server 1.0 (1999) derives from NextStep 0.8 (1988) which derives from both Mach and from BSD 4.3. It was only in 4.4 BSD-Lite that BSD eliminated all code claimed to infringe on USL so it is possible that some AT&T code is in OS X. But for most Sysadmins OS X has the Unix phenotype regardless of genetics. That's what really matters to most syadmins, developers and any users who care. – RedGrittyBrick Jun 22 '12 at 16:49

Taken from wikipedia:

OS X is based upon the Mach kernel. Certain parts from FreeBSD's and NetBSD's implementation of Unix were incorporated in NeXTSTEP, the core of Mac OS X.

OS X's core is a POSIX compliant operating system (OS) built on top of the XNU kernel, with standard Unix facilities available from the command line interface. Apple has released this family of software as a free and open source operating system named Darwin. On top of Darwin, Apple layered a number of components, including the Aqua interface and the Finder, to complete the GUI-based operating system which is OS X.

The Darwin sub-system in Mac OS X is in charge of managing the filesystem, which includes the Unix permissions layer.

share|improve this answer

If you're asking if OS X was developed using the code base of, for example, System V, the answer is no. OS X's lineage is goes back to BSD and Mach.

But that doesn't mean it's not a real Unix. As far as I know the certification doesn't really mean anything except that Apple decided to pay for it for Leopard.

share|improve this answer
But aren't System V and BSE both Unix? – KMC Jun 22 '12 at 14:55
Well, unix is a specification, not a OS - there were many varients of it - for example solaris was system V based, while most of the BSDs were based off 386 bsd. OS X uses elements of freebsd, as well as the mach microkernel. The idea was that you could compile and run software that met those specifications on a similar enough system. – Journeyman Geek Jun 22 '12 at 15:00
@JourneymanGeek Minor changes: Solaris 2.x is SVR4. Older (BSD based) SunOS was rebadged as Solaris 1. The original BSD was based off AT&T sources. 386bsd based off those, then NetBSD, then FreeBSD, then OpenBSD off of each other. – Rich Homolka Jun 22 '12 at 15:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .