What is UNIX at all ?
Short answer: UNIX is a specification/standard nowadays.
At the time of writing, to quote the official sources, "UNIX® is a registered trademark of The Open Group", the company which among many things provides UNIX certification:
"UNIX®, an open standard owned and managed by The Open Group, is an enabler of key technologies and delivers reduced total cost of ownership, increased IT agility, stability, and interoperability in hetero¬geneous environments enabling business and market innovation across the globe."
The same page specifically states which specification defines UNIX:
The latest version of the certification standard is UNIX V7, aligned with the Single UNIX Specification Version 4, 2013 Edition
Details of those specs can be found here. Curiously enough the latest standard listed on their website is UNIX 03, and to quote another source, "UNIX® 03 - the mark for systems conforming to version 3 of the Single UNIX Specification".
To quote the About Us page with my own emphasis in bold:
The success of the UNIX approach led to a large number of “look-alike” operating systems, often divergent in compatibility and interoperability. To address this, vendors and users joined together in the 1980s to create the POSIX® standard and later the Single UNIX Specification.
So what this suggests (or at least so is my interpretation), is that when an OS conforms to the POSIX standard and Single UNIX Specifications, it is compatible in behavior with Unix as an OS that once existed at one point in time in history. Please note that this does not mention the presence of any traces of the original Unix source code, nor does it mention the kernel in any way (this will become important later).
As for the AT&T and System V Unix developed by Ritchie and Thompson, nowadays we can say it has ceased to exist. Based on the above sources, it seems UNIX nowadays is not that specific OS, but rather a standard derived out of the best possible generalization for how operating systems in Unix family behave.
Where does macOS X stand in the *nix world ?
In a very specific definition, macOS version 10.13 High Sierra on Intel-based hardware is compliant to the UNIX 03 standard and to quote the pdf certificate, "Apple Inc. has entered into a Trademark License Agreement with X/Open Company Limited." Side note: I hesitate to question what it would means for macOS 10.13 on non-Intel hardware to be treated as, but considering that hardware is mentioned for other OS, the hardware is significant. Example: "Hewlett Packard Enterprise: HP-UX 11i V3 Release B.11.31 or later on HP 9000 Servers with Precision Architecture" (from the register page).
Let’s return to previous section of my answer. Since this particular version of OS conforms to interoperability and compatibility standard, it means the OS is as close in behavior and system implementation as possible to original Unix as an Operating System. At the very least, it will be close in behavior and in environment. The closer it gets to system level and kernel level, the more specific and shadier the area will get, but at least fundamental mechanics and behavior that were present in Unix should be present in an OS that aims to be compatible. macOS X should be very close to that aim.
What is a distribution ?
To quote Wikipedia:
A Linux distribution (often abbreviated as distro) is an operating system made from a software collection, which is based upon the Linux kernel and, often, a package management system.
Let's remember for a second that Linux as in the Linux Kernel is supposed to be distributable software, with modifications, or at least in accordance with GPL v2. If we consider a package manager and kernel, Ubuntu and Red Hat being distributions makes sense. macOS X has a different kernel than the original AT&T Unix - therefore calling macOS X a Unix distribution doesn't make sense. People suggest that macOS X kernel is based on FreeBSD, but to quote FreeBSD Wiki:
The XNU kernel used on OS X includes a few subsystems from (older versions of) FreeBSD, but is mostly an independent implementation
Some people mistakenly call the OS X kernel Darwin. To quote Apple's Kernel Programming Guide:
The kernel, along with other core parts of OS X are collectively referred to as Darwin. Darwin is a complete operating system based on many of the same technologies that underlie OS X.
And to quote the same page:
Darwin technology is based on BSD, Mach 3.0, and Apple technologies.
Based on everything above we can confidently say, OS X is not a distribution, in the sense of Linux distribution. Similarly, other mentioned OSs are POSIX compliant and are certified Unix systems, but again they differ in kernels and variations on underlying system calls (which is why there exist books on Solaris system programming and it's a worthy subject in its own right). Therefore, they aren't distributions in the sense Linux distributions are - a common core with variations on utilities. In case of Linux, you see books on Linux system programming or Linux kernel programming, not system programming specific to distribution, because there's nothing system-specific about a particular distribution.
Confirmation of what we see here can be found in official documentation. For instance, article on developerWorks by IBM which addressed difference between UNIX OS types and Linux distributions states (emphasis added):
Most modern UNIX variants known today are licensed versions of one of the original UNIX editions. Sun's Solaris, Hewlett-Packard's HP-UX, and IBM's AIX® are all flavors of UNIX that have their own unique elements and foundations.
In other words, they are based on the same foundation, but they don't share exactly same one in the sense Linux distros share the kernel.
Note that the word distribution appears to be mostly used when referencing operating systems which have the Linux kernel at its core. Take for instance the BSD type of Operating Systems: there's GhostBSD, which is based on the kernel and uses some of the utilities of FreeBSD, but I've never seen it to be referred to as a BSD distribution; every BSD OS only mentions what it is based on and usually an operating system is mentioned as an OS in its own right. Sure, BSD stands for Berkeley Software Distribution, but...that's it.
To quote this answer on our site in response to the question whether different BSD versions use same kernels:
No, although there are similarities due to the historic forks. Each project evolved separately.
They are not distributions in the sense of Linux distributions. Consider the copyright notice from this document:
Portions of this product may be derived from the UNIX® and Berkeley 4.3 BSD systems
- the before mentioned POSIX standard is also referenced as IEEE standard (where IEEE is Institute of Electrical and Electronics Engineers, which handles among other things IT types of things).
- to quote Wikipedia: "In 2016, with the release of macOS 10.12 Sierra, the name was changed from OS X to macOS to streamline it with the branding of Apple's other primary operating systems: iOS, watchOS, and tvOS."
- Mac OS X history answer
- conceptual difference between Linux and BSD kernel
- macOS X can be referred to as either Unix-like OS, Unix-like system, Unix implementation, POSIX compliant-OS when you want to relate it to the original AT&T Unix;
- "Unix version" wouldn't be the appropriate term because macOS X is vastly different from the original AT&T Unix, and as mentioned before there's no more Unix in the sense of software, and it is now a more of an industry standard;
- Probably the word "distribution" fits only within the Linux world.
- The true problem is that you (the reader) and I have way too much time to argue about the topic which lawyers should be arguing about. Maybe we should be like Linux Torvalds and use terminology and OSs that just allows us to move on with the life and do the things we honestly care about and are supposed to care about.