37

From my limited knowledge: The Unix OS coder assumes the user knows what they're doing, etc. versus the Apple's you can only do it the way you are allowed to do it, etc.

Compared to other variations of Unix, what are Mac OS X's limitations, but also does it improve the user experience?

To try and clarify the question, it's more the user experience I'd like to read find out about. Although it's of interest that it's certified, that's not so relevant - Linux is not certified, but it's the closest I've come to using Unix up till now.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
Rob Kam
  • 1,856
  • 2
  • 20
  • 29

8 Answers8

58

Mac OS X is plain Unix. This is a BSD Unix flavour, and is certified SUS V3 (Single Unix Specification version 3).

This means that everything that a software engineer or system administrator expects to find in a Unix system is present in Mac OS X.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
mouviciel
  • 3,058
  • 20
  • 17
  • Edited the question to remove -like from Unix-like. – Rob Kam Oct 01 '09 at 08:14
  • 1
    Edited my answer to remove -like from Unix-like. – mouviciel Oct 01 '09 at 08:19
  • In fact, OS X is so much "Unix-like" that you can compile almost anything out there written for Unix-(most likely Linux)machines and use it. – Wolf Oct 01 '09 at 08:59
  • It is actually MACH not BSD, though it has a BSD-like API. – kmarsh Oct 01 '09 at 12:58
  • 14
    This is a BSD system built on top of a MACH microkernel. – mouviciel Oct 01 '09 at 14:00
  • @Wolf: You can't compile anything on a Mac *until you install a compiler on it*. I think that this applies to Mouviciel's "everything that a coder or sysadmin expects" as well. I expect a damn compiler, and OSX does not arrive with one (not out of the box). – Telemachus Oct 01 '09 at 15:20
  • 3
    Telemachus - Yeah but in all fairness, most users won't ever use it and it's readily available in the XCode tools that is on the install disc that ships with all Apple computers. – MDMarra Oct 01 '09 at 15:38
  • @Telemachus: Xcode is an option that is present on the install DVD of Snow Leopard. Not exactly out of the box, but not far from it. It would be interesting to check whether a c99 compiler is present out of the box. It seems that it is mandatory with SUS V3. – mouviciel Oct 01 '09 at 15:39
  • @Mouviciel: I don't have a fresh machine handy, but I'm pretty sure that there is *no* compiler on current Macs out of the box (literally, fresh out of the box). And, yes, the installer isn't far away to get a compiler, but I still think it matters that it isn't installed by default. – Telemachus Oct 01 '09 at 16:33
  • 5
    To be fair, if the stuff is on the disk, it is available "out of the box", depending on what box you're referring to. – Phoshi Oct 01 '09 at 17:05
  • 1
    @Phoshi: Now we're just arguing semantics. When you take the machine out of the box and turn it on, there is no compiler. In order to get a compiler, you must either (1) become a Mac developer and download XCode or (2) know that a compiler is included in the "Optional" tools on an installer disc. That's not "out of the box" to me. – Telemachus Oct 01 '09 at 17:12
  • 8
    @Telemachus: Most people who use a Mac don't want XCode, so installing it would be a waste of disk space. If you have any clue that you want a compiler, you can easily install one. If you need everything pre-installed for you, and you can't handle a simple installation step, you'll never make it in software, and shouldn't be trusted with a compiler. – David Thornley Oct 01 '09 at 17:30
  • 3
    @David: I don't disagree about *why* Apple doesn't include a compiler. I'm simply saying that *it's not there*. That fact means that, in that regard, OSX is not especially Unix-like (license or not). In fact, as Mouvicel mentions, a c99 compiler is a requirement of the SUS spec, but I think Apple gets a pass by putting the XCode tools on a disc in the box. – Telemachus Oct 01 '09 at 17:34
  • 8
    @Telemachus: The compiler *is there*. It's right in the box. I don't understand why you think all Unix-like OSes should work the way you want when you first turn on the power. There's a long and honorable tradition of fiddling things to make a Unix box work the way you want. – David Thornley Oct 01 '09 at 19:48
  • 1
    @Tele, indeed we are :) I just don't think it's a major issue - if you want it, it's there. If you don't, well, it's not! – Phoshi Oct 01 '09 at 21:11
24

IMHO, this question can be interpreted in two ways. At the literal level, Mac OS X gained UNIX 03 certification with the release of Mac OS X 10.5 (Leopard), and is as Unix as it is possible to be.

On a more subjective level, Mac OS X is merely a rewrite of replacement for the classic Apple operating system, Mac OS. The interesting aspect of Mac OS X is that it is a POSIX compliant OS that happens to use an XNU kernel, which can trace its roots to BSD. And that it was released as an open-source project, Darwin. The POSIX compliance lets software packages written for Linux or BSD be ported to Mac OS X.

However, Mac OS X is more than just the kernel, and IMHO, Mac OS X is closer in spirit to Mac OS than to any other Unix variant.

Update: Link to Joel Spolsky's take on Biculturalism where he primarily talks of the schism between Windows and Unix cultures, but also touches briefly on why Apple succeeded in providing an excellent "Desktop Unix" with Mac OS X.

Update 2: Link to Unix philosophy as explained on Wikipedia.

"Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface."

My highly subjective opinion that Mac OS X is closer to MacOS than a "traditional" Unix OS stems from my opinion that Mac OS X has usability as its overriding goal, and not the above. That said, I do agree that it is also valid to consider Mac OS X a true Unix by focusing on the many points of commonality.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
  • 8
    Mac OS X isn't a rewrite of the classic Mac OS at all — it's based on NeXTSTEP. – s4y Oct 01 '09 at 16:01
  • 1
    @SidneySM: In a way, it's lineage is irrelevant. When you *use* OSX, it feels like Mac a lot more than like Unix. – Telemachus Oct 01 '09 at 16:54
  • 1
    @SidneySM Thanks, you're right. By "rewrite" I meant to convey that it didn't have any code in common with its predecessor, the Mac OS, and not that it was rewritten from the ground up. It obviously didn't come out right. I'll fix it asap. –  Oct 01 '09 at 17:01
  • MacOSX is a real live Unix with a very different UI layer on top. You can always drag the terminal app into the dock (I did) and have fun with using the Unix internals from the command line (I do). – David Thornley Oct 01 '09 at 17:32
  • @David Thornely All Unix and Unix-like systems I've worked on can be administered completely from the command-line, and the GUI is a component you can turn off. They also have minimal to no functionality that can be achieved only via GUI. OS X is very different on both counts, wouldn't you agree? My point is that while it is very Unix-like on many counts, it is equally *un-* Unix-like on many other counts. However, it is MacOS-like on almost all counts. –  Oct 01 '09 at 18:27
  • @nagul: I'm not as up on MacOSX administration as I could be (I live mostly on the Ubuntu box), so what administration requires the GUI? Bear in mind, also, that when I was administering an AIX box a long time ago I didn't want to have to do administration via the command line, but stuck to the supplied tools. – David Thornley Oct 01 '09 at 19:51
  • @David Thornley How about booting into a console and then being able to start up and shut down the GUI interface on demand? Or changing default file associations? Or changing power management behaviour? There are a million small things not easily tweakable from the console, because the Mac environment and culture don't encourage or need it. The strength of the Mac is in the GUI, and you're encouraged to stick to the supplied GUI tools. The situation tends to be reversed on Unix systems. Even when the GUI tools are good, they tend to be composed from equivalent CLI bases. –  Oct 01 '09 at 21:41
  • 1
    @David Thornley We can debate this ad nauseum, but possibly our differences lie in our interpretation of the Unix philosophy. http://en.wikipedia.org/wiki/Unix_philosophy I happen to think OS X is geared towards usability, and not this (especially the last bit): "Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface." –  Oct 01 '09 at 21:47
  • @Nagul: the Unix philosophy quote helps a lot. I wish one of us had put that in our original post. You should think about moving it up into your answer. – Telemachus Oct 02 '09 at 00:41
  • @Telemachus: Thanks, I just updated my post with the quote. –  Oct 02 '09 at 09:08
  • 3
    If you follow the traditional UNIX philosophy too literally, you can't have a graphical desktop environment. – hasen Oct 21 '09 at 07:14
13

Open a Terminal and it's Unix. Use the GUI, and it's OS X. Many of us consider this the best of both worlds.

I never would have switched to Mac if there wasn't a Unix underneath.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
Max Howell
  • 627
  • 3
  • 9
  • 13
  • I am switching to a Mac because of this. However, I really want to see their future OS versions (Yosemite, etc) pass the latest UNIX specification. – Kensai Oct 11 '14 at 22:37
11

As some of the answers have said, there are two sides to this question.

If you mean a license, then OSX is official Unix (TM).

On the other hand, if you mean does OSX feel like a Unix system, I would have to say not really (or maybe "not exactly"). OSX goes out of its way to hide away quite a lot of the Unix-y filesystem from you. Compare the output of ls / with opening the main hard disk drive in the GUI. It also doesn't have a compiler installed. (It is available in the box and you can install one pretty easily by installing the Xcode tools, which are readily available on one of the installer discs, but they're grouped under "Optional" or "Extra" install items. I forget the exact wording.) These are two big examples, but there are many other examples of little things that are just a bit off or different in OSX. (Not good or bad, necessarily, but different.)

Apple works very hard now, I think, to provide their default "Just works" friendly face to the majority of their users while also allowing developers and geeks to treat OSX like a standard *nix machine. But the result makes OSX systems a bit of a compromise. (That's not necessarily a bad thing.)

Edit: It's interesting how strongly people feel about this question (me included). I think that some answerers are being very literal: It's as Unix as Unix can be because they have a piece of paper that says so from Unix (TM). Others of us are saying, "But it looks like, walks like, and quacks like a Mac. It doesn't feel at all Unix-y (much less look it)." As I said originally, I think that there are really two questions here: one about the specification and license and one about user-experience.

Telemachus
  • 6,845
  • 1
  • 27
  • 33
  • 3
    You can get the output of ls / with Terminal.app. Both worlds coexist in Mac OS X. This is not a compromise. The GUI works on top of Unix, just like Gnome works on top of Linux. – mouviciel Oct 01 '09 at 15:49
  • 1
    What Unix are you using that the development system is part of the default install? – Richard Hoskins Oct 01 '09 at 16:21
  • @Mouvicel: My point is that quite a lot of the items visible with `ls -l` are made invisible in the GUI. You don't see `/bin`, `/etc` and so on. To clarify this: I find it bizzare (and telling) that Apple goes out of its way to hide these items. – Telemachus Oct 01 '09 at 16:35
  • @Telemachus, You can have the Finder display everything http://www.osxfaq.com/DailyTips/02-2005/02-01.ws – sal Oct 01 '09 at 16:54
  • @Sal: well and good, but *there's a reason* that Apple hides that stuff. That reason, which I may not be able to express clearly, is what makes me say that Apple has deliberately hidden the Unix in their operating system. – Telemachus Oct 01 '09 at 16:58
  • 1
    @Telemachus +1 for duck-typing. It expresses the *spirit* of the change from Mac OS to OS X succintly. In my opinion, Apple wanted to improve the guts of the Mac while keeping the user experience unchanged, and succeeded quite beautifully. –  Oct 01 '09 at 17:11
  • @Mouvicel: To clarify the key thing, in Gnome what you see in a terminal (using `ls -l) and what you see in the filemanager (Nautilus) is *identical*. For various reasons, Apple does some voodoo magic to make the GUI show fewer items than the terminal (and not just hidden dotfiles). I find that telling. – Telemachus Oct 01 '09 at 17:21
  • There is a compiler in the box. – David Thornley Oct 01 '09 at 17:34
  • @David: Fine, I edited my answer to avoid the phrase "out of the box." There is no compiler installed on OSX by default. – Telemachus Oct 01 '09 at 17:40
  • 2
    @Telemachus: There wasn't one installed on my first Ubuntu box. I had to go to the work of typing "sudo apt-get install development-essentials", and then entering my password. It did surprise me. – David Thornley Oct 01 '09 at 19:52
  • 2
    @Telemachus: I understand your point and considering the edit of the OP, this is the kind of argument he wants to get. From a user point of view, there is no hint that Unix runs under the hood. – mouviciel Oct 01 '09 at 22:11
5

I'd say Unix can only be defined by the various Unix flavors out there.

Consider the question: what's Unix like?
The Answer: Try a Unix system to get a feel for it.

If OS X is certified Unix, then what are you really asking?

Are you asking how close is it to the traditional gui-less Unix from the 80's?

Well, in that case, one can ask, how Windows is Windows 7? It's certainly "official" windows, but it doesn't feel anything like Window 95, let alone 3.1, not to mention MS-DOS. Does that make it any less of a Windows?

Just because normal (non-tech) users don't see the Unix underneath the GUI, doesn't make OS X any less Unix than it is.

hasen
  • 5,168
  • 11
  • 43
  • 51
  • @Hasen: in addition to certification there is a question of philosophy. The traditional Unix philosophy stresses things that OSX emphatically does not stress. See Nagul's answer for more on this. Modern Unix-like systems certainly have a GUI, but they still follow (to one degree or another) the base philosophy. I'm not sure that Apple's OSX really does. – Telemachus Oct 02 '09 at 11:42
  • 1
    @hasen j: I'm very comfortable using Win XP on the desktop. Although I'd like to, I'm unable to find a Linux or Unix variant that I enjoy using enough to replace it. I'm wondering here, if perhaps it's worth trying to see what Mac OS X, as a variant of Unix on the desktop, feels like. – Rob Kam Oct 02 '09 at 12:18
  • 4
    @Rob Kam: Mac OS X is an extremely good OS on its own right. Despite the PR-ridden cliche, to a large extent it *just works*. If you haven't enjoyed your dose of Unix till now, I'd certainly suggest you try out a Mac. It is not *my idea* of a traditional Unix OS, but it is underpinned by both Unix and POSIX compliance and it is an excellent OS. –  Oct 02 '09 at 20:06
5

A significant point is how much you can do only via the GUI, and the answer is surprisingly little -- including modifying GUI settings or running AppleScripts. There are programmable command line interfaces to almost everything, and quite a few Unix utilities are also included without being explicitly mentioned, Subversion for instance.

As a matter of opinion, having been a Unix workstation user since the mid 1990s, Mac OS X is kind of like the Amiga and BSD had a love child that ran away and was trained in kung-fu in the mountains by IRIX.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
  • An interesting analogy. In my mind Amiga represents: powerful use of resources, ahead of it's time but especially that (when sufficiently tweaked, e.g. with Directory Opus) it was fun to use. – Rob Kam Oct 02 '09 at 09:18
4

The GUI is the one that hides the feature. Underneath it feels like a BSD with some cosmetic differences, and some platform differences.

When you drop to a shell, a *nix user won't feel all that out of place. I routinely do that with my MacBook anyways.

calyth
  • 223
  • 1
  • 6
3

The difference that stands out the most for me is that the default Mac OS X file system, HFS Plus, is not case sensitive. It is possible to use UFS, but this can limit the functionality of other parts of the OS. It was a bit jarring when I discovered the lack of case sensitivity. At least it is case preserving.

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
Spudicus
  • 51
  • 3