# linux/UNIX concepts

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi all - Are Linux and UNIX operating systems, and how do they interrelate? What are systems such as SCO UNIX or Solaris, and how do they differ from just regular UNIX? And why do programmers tend to prefer Unix-based systems over Windows?

##### Share on other sites
Quote:
 Are Linux and UNIX operating systems

Yes they are both OSs

Quote:
 and how do they interrelate

Linux is based on Unix

Quote:
 why do programmers tend to prefer Unix-based systems over Windows

More powerful functionality, you know what the os can do, windows has a lot of "eye candy" that slows it down, but I cannot say that programmers perfer unix over windows, its quite the opposite since Windows is kind of the standard today. But Unix/Linux is cheaper than windows.

Quote:
 What are systems such as SCO UNIX or Solaris, and how do they differ from just regular UNIX

Different versions and features, like Windows 3.1 compared to 95 and then XP.

You can also use [google] to find a lot more specific information on the two. I was just brief but can elaborte more if you need me to.

##### Share on other sites
Quote:
 Original post by helmslarAre Linux and UNIX operating systems, and how do they interrelate?
Yes. They're somewhat compatible with each other. There are standards they both conform to, you see.
Quote:
 What are systems such as SCO UNIX or Solaris, and how do they differ from just regular UNIX?
There is no regular unix, at least not any more. There are OSes that are called unix and there are OSes that are unix-like. The difference between them is just the name. (trademarks and such)
Quote:
 And why do programmers tend to prefer Unix-based systems over Windows?
A handy man prefers a toolshed full of every tool he could want. A normal person prefers a phone and the yellow pages.

##### Share on other sites
UNIX was an operating system developed by AT&T Laboratories. It is now an operating system "standard," specifying a common set of core operating system APIs and programs. The idea is that source code written for one UNIX operating system can be compiled on any UNIX operating system. Details on what makes up the standard can be found here.

The first open source UNIX was BSD, and most commercial UNIXes nowadays are based on BSD, including Solaris and MacOS X. Linux was an attempt to write a UNIX compatible operating system completely from scratch.

Here are several common reasons why people prefer UNIX over Windows:

• UNIX does more. Out of the box. Particularly when it comes to networking. The first networks were built with UNIX-like operating systems, whereas networking was an afterthought in DOS and Windows.

• Reliability. Again, Windows was aimed for individual users and was totally inappropriate for use as a mainframe OS. UNIX had been around much longer and was designed to handle critical operations.

• Reliability. The reason for the appeal of UNIX/Linux as a desktop operating system nowadays is that, by design, the operating system always assumes that the user is smarter than the computer. Microsoft has historically believed that "user friendly" means the operating system assumes it knows better than the user. This was true to an extent with MacOS prior to MacOS X, but then earlier versions of MacOS were also a lot simpler (i.e. it wasn't hiding functionality from the user).

• Cost. The recent open source UNIXes are catching up to their commercial counterparts in terms of quality, but obviously cost a lot less. Even commercial UNIXes such as Solaris and MacOS X have simpler licensing schemes than Windows, and have much lower TCO.

##### Share on other sites
If you want more specific questions, you'll probably get better answers from the UNIX forum down the page a bit.

##### Share on other sites
Note that "unix" and "UNIX" are two different things. "unix" means unix-as-a-concept and "UNIX" means the original unix operating system, developed at AT&T and now owned by SCO. Obviously, the first unix-as-a-concept OS was AT&T UNIX.

unix-as-a-concept means any OS in the style of the original unix. It's difficult to categorize, but here are several key traits of a unix-as-a-concept OS:

1. Tends to be written(mostly) in c. Also applies to many non-unix OSs
2. Characteristic directory strucure, with / as root and everything under it
3. everything-is-a-file, where typically many i/o targets represented as a file
4. (for newer unix-as-a-concept OSs) POSIX compliance, which ensures that programs written on one POSIX unix will compile/run on other POSIX unixes with no trouble

Quote:
Original post by Drew_Benton
Quote:
 and how do they interrelate

Linux is based on Unix

This is ambiguous; do you mean linux is based on unix-as-a-concept or the UNIX operating system?

If you mean Linux is unix-as-a-concept, then nearly all people will agree with you, especially since the creators of linux intended it to be.

If you mean Linux is based off of AT&T's old UNIX, as SCO is claiming, most linux people will disagree with you. The majority of them believe that linux was constructed entirely independent from SCO/AT&T UNIX.

##### Share on other sites
The above is mostly correct. Linux resembles Unix in a lot of ways, and is POSIX compliant, which is a standard that both Unixes and Linux conform to.

Unix systems have grown from the Original Bell Labs UNIX into many forms, some of which are Solaris, HP/UX, AIX, and the BSD's. AFIAK they are all either a direct lineage of the original UNIX code, or at one time were rewrites based on that code. Linux, on the other hand, has been completly written from scratch and is not based on any Unix code. It is based on the same standards, which is why they are so similar.

I can't speak for anyone else, but I prefer the Nix's beacuse they are a lot more robust, secure, flexible, and feature rich. I prefer to program on Linux for the same reasons. Linux was originally written by programmers for programmers, so it contains a lot of tools that are helpful to programmers. The fact that Linux is also an excellent desktop and server platform is a secondary (but no means a minor one) consequence.

To quote Marcel Gagne: The command line is power, and I like it.

##### Share on other sites
I prefer gui over commandline but I understand that for stability reasons cli is a better choice for system programs. I actually like all the linux distro packages you can download for free and play with them. Some software is unavailable under windows. Windows is pretty much "set it and forget it" type affair while one can tinker in linux, create his system the way he wants to. You have lot of choices that allow you to target slow and fast machines, lots of range there. Linux also doesn't force you to go where someone else ie. MS wants you to go. You don't need to upgrade your hardware for new os to get kernel bug fixes. On the other hand, the stability in windows kernels from versioning perspective allows for simpler or easier maintenance. But in the end I believe in a choice and linux has an ok system put in to support this. You're not forced to go with one desktop environment, etc. I've been windows user and now I'm tinkering with linux a bit after checking it out like I do once in a while. I think Linux on the desktop is becoming a reality, it just needs little bit more polish in terms of hw support. Xandros is almost there, Ubutnu and others follow. Lots of innovations brought forth like that automount/hotplug system, better installers, package maintenance tools, etc. Not to mention, the move to 64bit is happening on linux while MS only now goes into beta. It feels to be on the cutting edge with Linux in one way and a bit behind with some drivers on the other hand. Laptops and wireless is still bit iffy.

##### Share on other sites
At least when I went to school most CS courses were done on Unixes of various types so newly-minted programmers were more familiar with programming on Unix than on Windows. Windows was the OS you used to write your term papers and play video games. Thus a bias towards Unix for programming.

Unix doesn't really have more tools than Windows but people rely on them more and thus it's more likely they'll be there. e.g. you can walk up to a random Unix/Linux box, type vi, and it's very likely to work. You can do the same thing on my Windows box and it'll still work but do it on most others and it won't.

As another thread pointed out there's a general philosophy attached to OS's for whatever reasons and it's hard to break out of that inertia. Unix/Linux is historically used for research, programming, servers, etc. Windows is used for business and "productivity" software (i.e. Office).

##### Share on other sites
Quote:
 Original post by Anon MikeWindows is used for business and "productivity" software (i.e. Office).
I'd argue that it's only used for legacy business and "productivity" software. And games.

Most of the business software I've seen is just database stuff, and has moved to web-based services already (let's see... Access takes a million years to start. Choice: Upgrade all computer jsut so access can run? or upgrade one beefy server and have everyone use it over the network?), thus anything still running on the client's machine is pretty much just legacy stuff.

##### Share on other sites
Quote:
 Original post by Drew_BentonBut Unix/Linux is cheaper than windows.

Linux? Sure. Unix from one of the major vendors? Nope.

##### Share on other sites
This should explain a lot.

##### Share on other sites
Quote:
 Original post by Arild FinesLinux? Sure. Unix from one of the major vendors? Nope.

Um...

MacOS X: $129 Windows XP Home:$199

Solaris: Free for noncommercial use, Sun hardware includes license, $99 for an upgrade license MacOS X Server:$999 for unlimited user license
Windows 2003 Server (5 client): \$999

And for x86, Linux is pretty much as good as any of the other commercial UNIXes.

[Edited by - igni ferroque on December 17, 2004 12:22:00 AM]

##### Share on other sites
Quote:
 Unix doesn't really have more tools than Windows

If you were to compare the contents of the standard binary directories of a fresh Linux installation to a fresh Windows installation, trust me, Windows would pale by comparison. Apparently you've not done much looking around on a linux box.

Quote:
 You can do the same thing on my Windows box and it'll still work but do it on most others and it won't.

No, most windows boxes don't have vi. They don't need vi. They have Notepad. What's your point?

If anything, windows boxes are *more* universal than Linux boxes. However, they have less. Linux boxes are more often susceptible to customization than Windows boxes, so you might not find what you expect. On my box, you won't find vi. You won't find emacs. You won't find pico. You'll find nano. It's not *that* universal.

##### Share on other sites
Your average windows box shows up with perhaps one or two languages in esoteric places.

Used to be just like VBA in microsoft word. Now I assume that there's a C# compiler hidden away someplace.

On *nixes, your shells are programming languages. No editor is worth it's salt if it can't syntax highlight a couple languages. There are usually several dozen installed.

Your average unix box can't live without shell scripting, C, awk, sed, and usually perl as well. Linux definately has perl, and python as well. Bash scripts rock. I have a blog system I chained together with a couple of bash scripts. (and pyblosxom. I have an unusual situation that needed hacking around...)

Then theres the fact that all the parts of the system have their source code sitting around. For most people, that's a rarely used feature, but it's absolutely indispensable when it is used.

##### Share on other sites
Unix is a trademark that can be applied to an operating system if it meets the requirements of The Open Group, who own the trademark. A Unix will necessarily be POSIX compliant, because one of the requirements of The Open Group is that it conform to the Unix specification, which is a superset of the POSIX specification.

Linux is not an operating system. Linux is a kernel. Linux is not POSIX compliant, because POSIX says nothing about how kernels should behave, or even that kernels need to exist.

The operating system that is built around Linux is properly termed GNU/Linux. The GNU tools are almost POSIX compliant.

Unix is sometimes used to refer to operating systems that conform, or very nearly conform, to the Unix specification, but which don't have a license to use the trademark. An obvious example is GNU/Linux. To be clear, use the 'word' *nix in this case -- GNU/Linux is a *nix.

By itself, GNU/Linux isn't much good. What makes a good GNU/Linux is a good distribution. I use Gentoo, and the power of Gentoo is that I can install any package in the Gentoo package database with a single instruction.

I find it is generally easier to install programs in Gentoo than in Windows. To install Neverwinter Nights, for example, I only have to type emerge nwn. To play it, I then type nwn (or select it from the menu).

##### Share on other sites
Pretty much any tool you'd like to use on Linux has a Windows version or something very similiar to it. Thus Linux doesn't have more tools than Windows. The toolset that comes in the box is pretty much irrelevant since you're probably going to install additional tools anyway. Heck Suse 9.1 personal doesn't even come with make out of the box and make is pretty much required to do anything on Linux.

Maybe vi was a bad example. The point was that the toolset is more standardized in Linux than in Windows so your favorite tool is more likely to already be installed on a random box. The standardization is informal since it's basically a concequence of distributing apps in source form that needs to be built but nevertheless it's there. It's probably also a result of Windows being more GUI oriented so you don't need to know as much about how to run the various subtools manually.

##### Share on other sites
I'm sorry, while linux environments are common, I will never call them standard. I've seen systems that didn't even use bash - they were 100% tcsh systems. Give me a break!

(edit) A person's desktop linux system (which is a very different beasty from a server, which are EXPECTED to be standard) is guaranteed to be different in some fundamental way. Trust me.

##### Share on other sites
Quote:
 Original post by Mayrel...the power of Gentoo is that I can install any package in the Gentoo package database with a single instruction.
You're saying that the power of an operating system lies in the ability to install applications easily? Or am I reading way to much into this statement (taking it out of context, because you really mean "the power of Gentoo as a *nix")?

##### Share on other sites
Quote:
Original post by Oluseyi
Quote:
 Original post by Mayrel...the power of Gentoo is that I can install any package in the Gentoo package database with a single instruction.
You're saying that the power of an operating system lies in the ability to install applications easily?

Add to that the fact that what he describes is actually quite common: apt-get, urpmi (IIRC), etc.

##### Share on other sites
gentoo in my opinion isn't strong because of its package handling. If you ask me, the package handling is weak in many respects - I've been using gentoo for months, and still don't know how to get a listing of what packages I have installed (aside from grabbing it out of the emerge log). What I think makes gentoo so strong is the fact that it automates the process of fetching and building from source whatever package you want, applying any custom build tags you want. This way you can be sure to get the package optimized for your system (or at least, what you *think* is optimized for your system - GCC will happily compile with whatever flags you pass, whether it's good for you or not). It also makes uninstalling packages a breeze, as well as updating the global system. And I've *never* had the problems I've had with some others (like BSD's package system) where I go to grab a package and it's mysteriously gone.

*shrugs* It's all a matter of preference. In my opinion, the only thing that allows more customization than Gentoo is a LFS system. And only then because, well, you're building from even less of a starting point than Gentoo gives you. :-)

(which, anyone that thinks a gentoo install was strange or difficult should've been around for the early debian releases. I know experienced sysadmins who still haven't grown back all the hair they pulled out installing early debian.)

##### Share on other sites
Quote:
 Original post by andrewk3652gentoo in my opinion isn't strong because of its package handling. If you ask me, the package handling is weak in many respects - I've been using gentoo for months, and still don't know how to get a listing of what packages I have installed (aside from grabbing it out of the emerge log).

You can see what packages are installed because you specifically asked for them by looking in /var/lib/portage/world, and you can find out what packages you have installed by doing emerge -e world (there are other ways, but I just got up and that way takes much less thought)

##### Share on other sites
Quote:
 Original post by MayrelLinux is not an operating system. Linux is a kernel. Linux is not POSIX compliant, because POSIX says nothing about how kernels should behave, or even that kernels need to exist.

Well.....sort of. but not really.

If you dig deep within the posix standard, behavior is specified which could only result if the kernel supported the posix standard (or supported all the posix features on which a posix interface could be built) in that area. High-precision clocking and real-time standards come to mind. Threading also, but that is typically implemented in the kernel for performance reasons, not out of necessity.

So...does a kernel make up a posix system? No. Can a kernel play a crucial part in making a system posix compliant (to some posix standard)? Yes.

##### Share on other sites
Quote:
 Original post by metal leperYou can see what packages are installed because you specifically asked for them by looking in /var/lib/portage/world, and you can find out what packages you have installed by doing emerge -e world (there are other ways, but I just got up and that way takes much less thought)

Ah. Thanks.

(I knew what packages I had manually installed, what I had a little bit of a hard time keeping up with was some of the requisite packages that got built upon installing some package.)

##### Share on other sites
For more information on packages installed on a Gentoo system, see qpkg. You might find the output of qpkg -I interesting.