Flavours of unix

I’ve been wondering about the different flavours of unix - what are the differences, in what way are they the same?

To give you a bit of background, at uni, the CS student machines were solaris, at work now, I use HP-UX, I’ve also played with a linux box for about 5 minutes last weekend, years and years ago, I looked over the shoulder of someone who was playing with sinix. But I haven’t tended to do much with them - I’ve been more of a user than an admin (although I did build a HP-UX server once, by some miracle), and I’ve never really delved into the finer points of how it all works and how they’re different. I guess you could say I’m your classic, non-technical techie - software engineer by training, love geeky stuff, but avoid actually doing anything with it…

So what’s the deal - in what ways are unix’s the same and in what ways do they differ?

Books have been written about this topic.

Basically, there was the original AT&T official ™ Unix, but due to various factors they couldn’t sell it at the time. Some people at UCBerkeley created their own version. (Adding many of the standard aspects of that we consider key Unix components that the original didn’t have at all.)

Thus begat the “BSD” branch. The BSD branch was quite succssful for a while since there weren’t any others to be had.* It still survives today in the various FreeBSD/NetBSD flavors.

The early versions of SunOS were BSD based OSes. A splinter of that was used on old Alliant multiprocessors I used to admin.

But then stuff started to happen on the AT&T side which lead to the SYSV flavors of Unix. (“V” as in “5”.) These have now gained an upper hand.

Somewhere in there an attempt to standardize Unix came along, called “Posix”.

So Sun OSes were switched over to SYSV (causing just a few headaches for folk like me) and started down the long road to Posix compliance.

Linux (which hardly anyone pronounces correctly anymore) is a little hard to categorize. It seems to want to be a SYSV/Posix player but it has enough oddities to essentially make it a branch unto itself.

There’s all sorts of low level differences between the major and minor branches. There’s “whatever happend to bzero?” and other issues galore. Just way too much to get into.

And I’m not going anywhere near Ultrix (which I also admined), AIX, and all their evil fringe brethren. In short, many major computer companies had developed their own special flavor of Unix. These efforts are generally now being replaced by “adding to Linux” versions.

SCO, which has been in the news too much lately, basically inherited the old AT&T rights and has gone into the make-money-via-lawsuits business model. It’s very complicated, they used to be Caldera, a rather crappy Linux distro, but now consider themselves the Owners of Pure Official Unix.

*I actually got a cite in the BSD 4.2 docs.

Gosh, that’s a hard one to sum up.

The different Unix flavors started from a common base and diverged according to company goals. The basic commands are the same, but the options may differ (like the ps command. In Solaris, ps -ef is the common way to display processes, but other flavors use ps -aux. The -aux options are there in Solaris, but you have to use the executable in the ucb path). Someone familiar with one flavor can get around in the other flavors, but there are small, annoying differences.

Other differences are major. AIX handles user accounts differently than Solaris. Solaris uses flat /etc/passwd and /etc/shadow files. AIX uses some form of a database that I, admittedly, don’t understand very well.

The flavors from the major vendors are tailored to their hardware. Solaris for Sun hardware, AIX for IBM, HP-UX for HP and IRIX for SGI (does anyone still use IRIX?).

Linux is not developed for a single vendor’s hardware, but there are still major differences between the distributions. There is a linux standards base, but distribution owners aren’t required to follow it. Most of them stay fairly compliant, but Red Hat, for example, places the Apache files in a non-standard location because they prefer to.

Startup files differ from distribution to distribution. They are going to be somewhere in /etc/rc.d, but after that it’s anyone’s guess until you actually trace it through. Grrr.

Memory management, file systems, optimizations, scalability, built-in features; these all differ from vendor to vendor. The Linux distributions are closer since they are built on a comman kernel (unlike commercial flavors), but even then, optimizations may vary.

The question is too hard to answer in a post. The difference is like automobiles. For the most part, they all have four wheels. You can count on them having a steering wheel. In the US, the gas pedal is on the right, brake in the middle and, if necessary, the clutch is on the left. But jumping car to car you can never guarantee where the darn windshield wiper controls are. Unix is like that.

The other posters have already done a good job of summarizing the variation among Unices. The BSD vs. SYSV ancestry is probably the most divisive distinction. After that, each vendor adds its own flourishes as well. Still, there is a lot in common among them, and if you’ve learned one Unix, you’re learned them all (more or less).

I’ll just add that as a user or programmer on a Unix system, one should be aware of the following gotchas:
[li]The commands related to printing (lp/lpr, lpq/lpstat) can vary. There are basically two sets of differently named commands, one inherited from SYSV, the other from BSD.[/li]
[li]Likewise, and for the same reason, the ps command can have differently coded options.[/li]
[li]The rule about which group a newly created file or directory belongs to can vary.[/li]
[li]The choice of available file systems (ext2, UFS, etc.) vary.[/li]
[li]Low-level C calls that aren’t covered by the POSIX standard can vary. There was much more chaos in this area before POSIX arrived: threads and sockets in particular.[/li]
[li]The system file hierarchy (/usr/, /opt/, /dev, /etc, etc.) can be quite different.[/li][/ul]
And there are many more points I’m sure that I’ve forgotten, or never even knew about. Hope this is a helpful intro anyway.

You could always consult this simple chart.

LOL…Someone had way too much time on their hands.

BTW, SCO bought the rights to the name Unix from Novell, who bought it from AT&T.

Nonononono… SCO doesn’t own the name “Unix” – that’s owned by “The Open Group.” It’s a trademark, and I think (admittedly not sure) that they’re the ones who do official POSIX compliance testing to allow the name “UNIX” to be used. I think Apple is currently being sued, in fact, for calling Mac OS X a UNIX operating system, while Apple argues that the word’s been “Xerox’d” or “Kleenex’d” and doesn’t need to.

SCO owns certain portions of the AT&T source code, which they claim has been improperly put into Linux.

Yeah, the SCO thing is a mess. SCO basically is accusing IBM of illegally putting code it has inherited into Linux, and then making that code available under the GPL. Now SCO is not only demanding money from IBM, but is selling a license to Fortune 500 (as opposed to individual or small-business) Linux users to ensure that they won’t be hit with an SCO lawsuit in the near future. At $699 per Linux-running CPU, the license is murderously expensive and could easily kill Linux if anyone is insane enough to enforce SCO’s ramblings.

Truly, SCO has hit upon a legal protection racket.

Here’s an executive summary of the mess. It seems that SCO claims IBM misappropriated its `intellectual property’ (a rather vague idea that seems to want to subsume patents and copyrights under one umbrella), but will not say where this code is, or who actually did the misappropriation (in the Linux world source code files are usually the work of an individual or a small group, and histories are rigorously maintained). As these source code files are available to public scrutiny, those omissions are highly suspicious.

The Open Source Initiative has released an official position paper. Summary: SCO has no case based on sheer factual grounds, completely regardless of its raving insanity. Essentially, SCO said that Linux would not be where it is now without the influx of SCO code. That not only degrades the skill of Linux coders, who have done the amazing with nearly nothing, but grossly inflates SCO’s own importance. Caldera was never a major player, except maybe in its CEO’s own fantasies, and SCO does not hold all the cards with respect to Unix, and it never has.

Upshot: If SCO were a doper, it would have been banned for trolling and sheer idiocy.