It's also the standard system for Web servers. The fact is, millions of people around the world have interacted with Linux and Unix systems every day, most of whom have never written a line of code in their lives.
So what makes Unix so beloved by programmers and other techie types? Let's take a look at some of things this operating system has going for it. (For some background on Unix, check out The History of Unix: From Bell Labs to the iPhone.)
The ShellUser interface design has come a long way since the early days of computing. There are command-line interfaces, graphical interfaces, gesture-based interfaces, you name it. Most serious users, however, prefer the good old-fashioned command line. For one thing, since Unix-based operating systems often live on servers, using text-only software reduces the overhead. Instead of a dedicated monitor, keyboard and mouse to a server, administrators can log in remotely via SSH either into the machine directly or frequently into a console server, which shows operating system messages and lets them reboot the machine.
These users spend most of their time in the shell, which is the program that takes input and translates it into actions, either running programs or configuring the system. It's similar to the MS-DOS prompt or the old BASIC languages on eight-bit computers like the Commodore 64.
On Unix and Linux systems, the user has a choice of shells. The default in the Linux world is Bash, for Bourne Again Shell, a pun on the creator of one of the original shells, Stephen R. Bourne. Other popular shells are zsh, the C shell and the Korn Shell, named after David Korn.
This shows the preference of modular design in the Unix world. Everything up from the shell to the graphical user interface is just another program, and components can be swapped out easily. It also allows for an approach to development based on small tools. We'll get into those later. (Read about another type of shell, Mosh, in Mosh: Secure Shell Without the Pain.)
Everything Is a (Text) FileOne of the things that characterizes Unix-like systems is their dependence on text files, contrasted with other systems of the time that used opaque binary files to store configuration information. The focus on text irritated some users of other systems, but Unix users like it that way.
"The common thread was wordsmithing; a suspiciously high proportion of my UNIX colleagues had already developed, in some prior career, a comfort and fluency with text and printed words," Thomas Scoville wrote. "They were adept readers and writers, and UNIX played handily to those strengths. UNIX was, in some sense, literature to them. Suddenly the overrepresentation of polyglots, liberal-arts types, and voracious readers in the UNIX community didn't seem so mysterious, and pointed the way to a deeper issue: in a world increasingly dominated by image culture (TV, movies, .jpg files), UNIX remains rooted in the culture of the word."
The traditional Unix design has been to use plain ASCII text files as much as possible. Even devices such as the hard drive or the printer are represented as files. They aren't really text files, but programmers can treat these special files as if they are.
Small ToolsThe shell and having everything as a file lends itself to another major characteristic of Unix development: doing complex tasks by building pipelines out of small tools.
All of the shells have a pipeline character, "|", which sends the output of one program into the input of another. This makes stringing together programs easy.
Suppose you wanted a sorted list of all the users logged in to the system with no duplicates (as users can log in multiple times). Here's what it would look like:
who | cut -d' ' -f1 | sort | uniq
Although it looks strange, it shows the power of this style of development. If you decided to implement this from scratch in C, you might be looking at thousands of lines of code.
This style of development has been referred to as the Unix Philosophy. You might want to check out Mike Gancarz's book, "Linux and the Unix Philosophy", if you're intrigued.
Why Unix Lives OnSo why has this quirky operating system endured in the face of challenges from the likes of Microsoft? The answer is simple: Many developers find it's a refreshing alternative to the monolithic tools like IDEs and languages like Java. Instead of being handed down from on high by some corporation, modern Unix versions grow organically. Science fiction writer Neal Stephenson referred to Unix as the "Gilgamesh epic" of the computer world in his essay "In the Beginning Was the Command Line."
If its continued success is any indication, Unix will continue to attract many more developers in the years to come.