What’s the big advantage of UNIX?

605 views

I know it’s popular with professionals and scientists, and of course there’s MacOS, but I don’t know why. What makes it better or more preferable than something like Windows?

In: 22

16 Answers

Anonymous 0 Comments

Unix has alternative design philosophies that, while some parts are quite outdated by today’s standards, still make certain types of work much easier.

If you look into Unix history and behaviour, you may have heard the expression “everything is a file”. What this means it that an actual file on disk, a directory listing, communication between two programs access to some hardware (eg: keyboard input on a console), a network TCP connection, all behave somewhat similarly from an application’s standpoint. Those that don’t scrutinize their data sources can be “tricked” into using any of the above as a data source.

Eg: there’s a program called `sort` which does what it sounds like. Given a text file, treat each line like it’s a row in an Excel spreadsheet and sort them. I can sort an actual file, I can have a program’s output sorted before it’s shown, I could just copy/paste some text into it from my clipboard to be sorted for whatever reason, and if I have some massive job that one computer can’t do by itself I could have it send the job to another computer with more RAM to do the sort in real-time. The `sort` program itself doesn’t care – it’s all the same.

Process management (that is, running programs) may seem weird on Unix, but consider this. When you run a new EXE, the program that requests the new EXE be run is destroy and replaced by the new running EXE. That may sound weird, but if you have program A running and monitoring program B, it allows program B to substitute itself for program C but it’ll still be monitored by program A because it’s the same process ID number and all that. There’s also a process cloning function called “fork”. If you’ve seen the movie Multiplicity, it’s like that. A program can set itself up, and then duplicate itself into multiple processes all ready to go, all already set up. It’s also how you run a new program without losing the old one – make a fork first.

Some of it may sound weird, but the idea is to give you a bunch of dumb pieces but as few limits on how to connect them as possible. These become the fundamental building blocks upon which you can build something smart.

In general, Windows talks back to the user a lot more than Unix does. It says “no, you can’t do this”. Windows assumes the user is dumb and needs to protect itself from the user. Unix lets you do what silly things you want (as long as it doesn’t violate security rules) because it gives the user maximum creative flexibility, albeit at their own risk. Gotta know how to work it, and I’ve made my fair share of dumb mistakes.

You are viewing 1 out of 16 answers, click here to view all answers.