What’s the big advantage of UNIX?

53 views
0

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

I think it’s the ability for greater customization to be able to do a specific task easier and faster. Plus it doesn’t have a lot of “bloat ware” that is present in windows/OSx environments.

UNIX… or Linux? They’re similar in more ways than one, but I think you’re referring to Linux. And the short answer is it’s incredibly versatile, highly-configurable, and it’s (mostly) open-source. This means it can be customized for *a lot* of purposes, such as for web servers, for phones (Android is a type of Linux), super computers, desktop computers, video game systems, and as the underlying operating system for a lot of devices you probably don’t even think of as having operating systems (such as some synthesizers, washing machines, TVs, cars, cameras, medical equipment, scientific instruments, etc.) And the nice thing is *you* can customize your devices as much or as little as you’d like with various types of Linux.

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.

This is how I used to explain it: Microsoft designed windows using the concept that the operating system (and apps) are smarter than the user.

Unix used the opposite philosophy: you are smarter than the operating system.

Although I’m repeating part of another post, everything is a file is such an amazing concept that once you get it, every other way seems stupid.

FYI MacOS runs on a variant of Unix, so if you’re running something like the terminal or command line, many of the commands are the same. The UI of various variants of Unix is of course different as is the MacOS UI, and also the Apple specific calls an and APIs. Same for iOS.