What is UNIX?

Ok, I know its an operating system technology; but what exactly is it? What do people mean when they refer to the “power” and “security” of Unix in reference to Unix based OS’es? Is there anything fundamentally better about Unix than Windows?

I’ve tried both Linux and Mac OS X, which are OS’es that proudly bear a Unix lineage. Other than the terminal (which I don’t know how to use), I didn’t notice anything that much different from Windows or older Mac OS’es.

I’ve read that most high-end computing needs are met with Unix based systems - fields like science research, servers, engineering, etc. What makes Unix more capable of performing these duties?

Unix is designed in a completely different way from Windows.

Unix was designed from the ground up to be a multi-user system, and the mechanisms which regulate user access to the various parts of the system are built in at a very low level - as opposed to Windows, where the multi-user stuff was glued on later. WinNT, 2000, and XP are much better in this regard, but (I think) Unix is still ahead on this point.

Because of the restrictions and mechanisms in place, it is much easier to limit the damage a virus can do. Without doing some really sophisticated hacking, a virus is limited to the rights of the user whose account it is using. For example, on my (Linux) system, a normal user cannot access the modem - making it impossible for someone to send me a dial up program that will take over my dial up network settings - which is a quite common occurence under Windows systems here in Germany.

The modular structure of Unix contributes to its stability. Each piece is designed to do one job, and do it well. The simplicity eliminates some of the possibilities for bugs that a more complex system has.

There’s a lot more to it than that, of course, but those a couple of the easier things to explain.

One other thing:
Some Linux distros (and possibly Mac OSX) kind of hide the multi-user stuff and encourage using the super user (root) for everything. In that case, you’ve not got much protection from anything. It is dumb, but it happens.

The beauty of Unix is beautifully explicated in the seminal The Unix Philosophy by Mike Gancarz, which has recently been updated under the title of Linux and the Unix Philosophy, by selfsame author.

You can find essential quotes from The Unix philosophy here.

The gist of it is quoted below:

[ul]
[li]Small is beautiful[/li][li]Make each program do one thing well [/li][li]Prototype as soon as possible.[/li][li]Choose portability over efficiency.[/li][li]Store numerical data in flat ASCII files.[/li][li]Use software leverage to your advantage.[/li][li]Use shell scripts to increase leverage and portability.[/li][li]Avoid captive user interfaces.[/li][li]Make every program a filter.[/li][/ul]

Windows completely ignores almost all of these tenets or bastardizes them. These tenets may not make much sense to you immediately as a casual user of desktop software, but they make for secure, robust, maintainable, extensible, portable, scriptable, powerful software and systems. Everyone wins in the end, developer and user alike, even if the initial learning curve might be a little steep for both groups compared to competing solutions.

While I agree with all the points listed by transitionally, and use them all the time, they are not UNIX, but rather how people use the power UNIX gives us.

UNIX is an inherently clean multi-user OS, first developed by very smart people. UNIX began after Bell Labs dropped out of the Multics project, done by GE and MIT. Multics is a very good multiuser OS, best of its kind at the time, but mainframe oriented. UNIX was a simpler OS with most of the good points of Multics but few of its bad points.

Of course, the fact that UNIX was developed by ghods helped quite a bit!

Windows is an inherently single user system patched and hacked to be multiuser. Have someone tell you about DLL hell sometime if you don’t believe it.

A good Unix distribution (Linux, BSD, or whatever else) is a userland which demonstrates the Unix philosophy at work.

There will be lots of programs fulfilling a variety of needs that have been developed (and continue to be either maintained or further developed) with the tenets of the Unix philosophy in mind.

So, yes, the Unix philosophy says something about how people use Unix, but more importantly, it has a lot to say about what someone can expect to find in a good Unix distribution and what makes it better than a Windows OS.

Note that Unix was originally developed as a single user platform. Hence its very name! The wheels of Berkeley were mostly responsible for first making it multi-user. What first (barely) came out of AT&T and what people later came to know as Unix (in the form of a Berkeley distro) were quite different.

Unix is one example of a modern OS. (And a disk based OS at that, hence it is a DOS. MS is just one of a multitude of DOS makers.) It has standard stuff like multiprocessing and virtual memory that’s been around since the Alan Turing days (Atlas) but was only incorporated fully into MS OSes relatively recently.

User/group/device protection has been mentioned but still most ordinary PC users “don’t get it.” It really makes things a lot safer.

The stability of a good OS is really, really nice to have. To only have to reboot my old Sun Solaris (a “SYSV” flavor of Unix machine) once, maybe twice a year was great. And I was installing and uninstalling stuff all the time. No blue screens, no reboot after an install, etc. If they had fixed the memory leak who knows how long I could have gone without a reboot.

A guy I know is into serious networking research. That he can stop and start daemons in Linux is something he can’t live without.

A device has stopped working on a Linux box? Kill and restart its process.

All of the above is true, but there’s a big element of of market drivers to all of this. Long ago, unix started with and has been embraced by deep scientific types, and as a result, it’s grown to satisfy their needs. And long ago, windows had more of a consumer focus, and it’s grown to embrace that market’s values.

I want to re-iterate what ftg said: contrary to claims by other folks in this thread, all three prevelant OS’s (unix, win, mac) started as single user OS’s and were later form-fitted to be multi-user. In fact, all of them had lots of stuff bolted to them along the way, such as GUIs and network connectivity.

Each OS has done better along the way in different dimensions. For example, unix’s standard GUI (X) is really poorly designed for what it’s become, and many leaders in those circles want to redesign it from the ground up. There are plenty of other examples for all OS’es out there. So don’t let anyone tell you that one was “designed better from the ground up”. A lot of stuff was just target market direction and frankly just plain luck.

I’m a big user of linux; I’m using it as we speak. But it’s not magic. It’s just conformed to a market over time that’s made it ideal for some apps and not others. And the same for other OS’es.

Bill H.: But you have to admit that by the late 1970s, when microcomputer OSes were still written into ROM and completely incapable of doing two things at once, UNIX was supporting multiple users in a timesharing environment with a very real concept of memory protection and privilege levels.

Now, a lot of that was hardware. The 6502, for example, isn’t capable of protecting memory (or even accessing much memory to begin with). But even when microcomputer hardware caught up, many users were still running OSes built for the 8088 or the 68000. It took 486BSD and Linux to bring decades-old UNIX concepts to the desktop machines most people were using (Amiga users, for example, can feel smug right about now), and it seems that the Major Player still hasn’t caught on.

UNIX was designed to be single-user in the early 1970s. It was also written in PDP-8 assembly and didn’t have a fully-functional filesystem. By the end of the decade, it had become a strong multiuser OS written in portable C. MS-Windows was designed to be single-user in the early 1990s, and it still hasn’t completely grown out of it.

If you want to blame things on marketing, I think I know one Major Marketing Department that’s responsible for a lot of the current mess we’re in.

OK, to nitpick my own post: UNICS was written for the PDP-7, not the PDP-8. AFAIK, it never was ported to the PDP-8 when it was still written in assembly. It was soon ported to the PDP-11/20, a process that required them to port PDP-7 assembly to PDP-11 assembly. In 1973, it was ported to C and released to the world.

And it was 386BSD, not 486BSD, which makes sense: The 386 was the first Intel processor with protected mode, an essential concept to a true UNIX system that must be in hardware to be fully effective.

My memory jogger.

Unix (not UNIX or unix) is written in C, which means it can (more) easily be ported to multiple platforms. That’s why you can just download Linux and run it on your whatever-it-is box. Try that with Windows.

The “Unix philosphy” is, among other things, to use programs that interact easily, instead of stand-alone programs. This means that you can use your word processor and then pipe the output to your spell checker or custom program or whatever without having to wait for the folks who wrote the word processor to add a particular feature.

As far as security goes, the mainframe (OS/390, z/OS) is by far the most stable and secure platform available, but it’s not very flexible.

As far as a user interface for non-geeks goes, Windows is by far the best. But personally I have a problem with any OS that a) allows overwriting of system files by a game installation program and b) can’t kill a process that is hogging the CPU, dangit!

I personally prefer MacOS as do many others. It wasn’t the OS underbelly-architecture or the mighty Motorola CPU that kept us loyal to Macs!

Derleth wrote

Absolutely true. And even though (as you point out) part of that is because of the underlying hardware, also part of it was that this was important to the designers and users. As opposed to Windows, where it wasn’t.

I may not have been clear, but I’m not “blaming” anything, or using “marketing” in it’s sleazy salesman connotation.

What I meant was that markets (not marketing people, but people who buy things, the actual market) define what they want, and businesses provide it because otherwise they die. Products grow and morph to meet the market’s expectations. The people who embraced Unix early on had a different set of expectations than the people who embraced Windows early on. And each had a different expectation from the people who embraced Apple early on. Each of those sets of expectations built each of those products to be what they are today.

In the OP, Headcoat asked, “I’ve read that most high-end computing needs are met with Unix based systems - fields like science research, servers, engineering, etc. What makes Unix more capable of performing these duties?”. My point is that it performs to the needs of scientists because scientists have used it for a very long time, and made demands from it, and seen those demands satisfied in new releases, and over time it has evolved to be what they want it to be.

Bill H.: You still have to take into account advertising’s impact on the market. By effectively keeping the public in the dark about general security concepts, Microsoft ensured a market for its dangerously insecure Windows products long after the hardware limitations characteristic of the early days of microcomputers had been made obsolete by chips like the 386.

What began as a public clamboring for software simple enough to run on an 8088 became marketing-influenced public apathy about security. Because Microsoft has never embraced secure computing the way Linux, the BSDs, and other *nix systems have ever since the late 1970s, we’re left with a great mass of computer users apparently willing to be victimized by the next worm or other piece of malware.

Nothing made Microsoft release Windows 95 with no concept of file permissions or basic process limitations (as in, no one process can monopolize the computer’s resources). But they did, and they released Windows ME in a similar vein, and they released Windows XP broken enough to be vulnerable to the Blaster worm. If Microsoft hadn’t used marketing to condition users to accept these failures as normal, it would have perished long ago or been forced to release an OS with real security.

Mea culpa! My vision is limited by my business contacts, very few of whom use Macs. I hereby proclaim that most (if not all) of the user-friendly features of Windows were taken/copied from the “Look and Feel” of the Mac operating systems. IMHO, of course.

Mea culpa! My vision is limited by my business contacts, very few of whom use Macs. I hereby proclaim that most (if not all) of the user-friendly features of Windows were taken/copied from the “Look and Feel” of the Mac operating systems. IMHO, of course.

Actually, in all fairness to Microsoft, I think Windows (W95 and beyond, not the hideous abomination that was the Windows 3.x GUI) borrowed extensively from various X11 GUI elements as well as the Mac. I don’t like it anywhere near as well as the MacOS but some of the differences – e.g., the menus being attached to the window rather than having a universal menubar at the top of the page, the “X” close-window box on the right, the right-click “contextual” menu – are typical of Unix GUIs. And while I am not familiar enough with all the various GUI schemes to say which elements came from where, I would assume that some aspects of the GUI are original to Windows. In some cases, such as the contextual menu, some GUI ideas have even traveled from Windows to Mac

Not everything that is good and GUI was invented on the Mac. The fundamental idea of displaying directory (folder) contents as a window and using a mouse to interact with files and issue commands and represent files with icons was Xerox before there was a Mac, although very few people had ever seen one.

But yeah, a whole lot of what everyone takes for granted did originate with the Macintosh – menus where you see the menu-titles and click on them to see the menu items, icons that you single-click to select and double-click to open (which launches them if they are applications), windows that you can drag around on screen and resize, files and folders that you rename by clicking on the existing name and typing the new one, a trash can to throw things now and empty later (or perhaps change your mind if you do it soon), files and folders and other icons that you move by clicking and dragging, and copy to other volumes by dragging to them…that’s Mac. A File menu, always on the far left, with New Document and Open and Close and Quit (Exit), followed by an Edit menu, always second from the left, with Cut Copy Paste and Undo…that’s Mac. Command-O (or Control-O) for Open, P for Print, S for Save, N for New, X for Cut, C fror Copy, V for Paste, Z for Undo, A for Select All, W for Close Window, Q for Quit…that’s Mac. The Open / Save / Save As dialog box, where you give the file a name and navigate to where you want to put it (or navigate to an existing file to open it)…that’s Mac.

(Actually, to be totally pedantic, a great many of those things were actually originally Lisa, not Mac. The Lisa was an upscale business computer from Apple that did not sell very well, and the Lisa operating system’s GUI was the direct ancestory of the Mac GUI that followed and improved on it)

Sorry, I’m babbling, aren’t I?

AHunter3. I actually did use Xerox Altos for several years. The single/double click thing was already there within programs. (But not on the desktop.) The desktop (officially) appeared in the Xerox Star & Dandelion and much of the desktop interface/mouse stuff you mentioned was in that. Not so sure about specifics of keypresses. Xerox practically deprecated keyboards in the Star.

Apple was not all that original.

It’s also quite clear that a lot of X-Windows stuff was adapted by Microsoft. Just keep in mind that MS changes things just for the sake of change so things are a little different. Like “/” vs “” in MS-DOS.

Plus their practice of not integrating different filesystems into the directory structure, so you have ‘A:’ as the root directory of the floppy drive’s filesystem, ‘C:’ as the root directory of your bootable partition’s filesystem, and ‘D:’ as the root directory of your hard disk’s secondary partition’s filesystem.

In Linux, everything is attached to the single root directory, which is ‘/’. Different filesystems are mounted to different places in the filesystem, and then behave just like a part of your bootable partition’s filesystem’s directory structure. For example, my floppy is mounted on ‘/mnt/floppy’ and my second hard drive (120 GB, bay-bee! :D) is mounted on ‘/mnt/new’.

Why does Microsoft do it like that? Because CP/M did it like that. Why is the floppy drive called ‘A:’? Because CP/M was written in an era where microcomputers only had hard drives as an add-on, and nobody considered them vital. All you needed was a bootable floppy with CP/M on it and a microcomputer with a floppy drive and you were all set. Therefore, your prime drive was the floppy, so it was logical to call it ‘A:’.

Plenty of it was developed on the NeXT. :slight_smile:

Derleth, drives are one thing I really wish for in unix, especially mappable drives. compare:
$ cp /usr/local/myapp/mydir1/mydir2/test /mnt/floppy/floppydir1/test

vs.

C:> copy test a:

(ok, I know that’s not a totally fair comparison, but you know what I mean)

Or at least I wish I could have a dir stack like 4dos (a Command.COM replacement) offers.

Also, though there are some benefits to unix’s multiple partition requirements, in general it’s needlessly complex and limiting, compared with windows single file system.