UNIX: Obscure Facts & Hidden Histories

A collection of interesting trivia about the world's most influential operating system.

The First UNIX System Was Written in Assembly

The very first UNIX system (1969) was written in PDP-7 assembly language, not C. It wasn't until 1973 that it was rewritten in C, enabling its revolutionary portability.

The Name “UNIX” Was a Joke

The name "UNIX" was a pun on "Multics," the complex OS it aimed to replace. Brian Kernighan coined it as a play on “UNiplexed Information and Computing Service.”

A "Space Travel" Game is at the Root of the UNIX system

UNIX development began as an environment to support a space-themed game that Ken Thompson developed, which he ported from Multics to a spare PDP-7 computer.

/dev/null is the "Bit Bucket"

In a UNIX system, `/dev/null` is a special device file that discards anything written to it. System administrators jokingly refer to it as the “bit bucket” or "black hole."

First "Email" Was the `write` Command

Before `mail` or `sendmail`, early UNIX users communicated via the `write` command—a real-time messaging system between terminal sessions.

The Creators Also Wrote `chmod`

Even after winning the Turing Award for revolutionizing computing, Dennis Ritchie and Ken Thompson still did the "mundane" work of writing the first versions of commands like `chmod`.

Originally Had No root Password

Early UNIX systems at Bell Labs had no password for `root`. The concept of system security wasn’t a priority. Ken Thompson once joked:

"The more you restrict access, the more you encourage creativity in bypassing it."
The `ed` Editor’s `?` Was a Hack

`ed`, the original UNIX system editor, responds to errors with just `?` because memory was extremely tight (the PDP-7 had only 8KB of RAM) and Ken Thompson thought verbose errors were wasteful.

Plan 9 Was Meant to Replace UNIX

Ken Thompson and others at Bell Labs created Plan 9 to extend the UNIX system philosophy to networked resources. While it never gained wide adoption, it remains highly admired by systems enthusiasts.

The Most Useless (But Fun) Command

The `rev` command reverses its input line-by-line. While seemingly useless, it’s a fun leftover from old text-processing tools.

$ echo "UNIX lore" | rev
erol XINU
The First "Daemon" Was a Dragon

The term `daemon` comes from Maxwell’s Demon, a physics thought experiment. At MIT, the first daemon was a literal dragon in the `Spacewar!` game that Thompson & Ritchie played.

Built on "Worse is Better"

The UNIX system philosophy embraced simplicity even if it was incomplete. For example, the `creat()` system call lacks an "e" but it worked, and `rm -rf /` had no safeguards but was fast.

UNIX Time Will "Break" in 2038

On 32-bit systems, UNIX time (seconds since Jan 1, 1970) will overflow on Jan 19, 2038. The fix? Most OSes now use 64-bit time, pushing the problem to the year 292 billion.

`vi` Was Created Because `ed` Was Too Hard

Bill Joy wrote `vi` in 1976 because `ed` was unusable for normal editing. The first version of `vi` was just a visual layer on top of `ed`'s line-based commands.

Filesystems Allow Deleting Open Files

On a UNIX system, if you `rm` a file while a process has it open, the file stays on disk until the last process closes it. This is because UNIX treats the disk entry and the file handle as separate entities.

The Self-Replicating C Compiler

In his legendary "Reflections on Trusting Trust" lecture, Ken Thompson described how he inserted a Trojan horse into the C compiler that could hide itself by rewriting the compiler during compilation.

`sudo` Was Originally Called `su2`

The `sudo` (superuser do) command was developed in 1980 at SUNY Buffalo. An early version was simply called `su2` before being renamed.

The Original License Was Just $100

In the 1970s, AT&T licensed the UNIX system to universities for just $100, which included the full source code. This decision led to its widespread academic adoption and fueled its explosive growth.

The `crypt` Command Used the Enigma Algorithm

Early UNIX systems' `crypt` command used a weak, rotor-based cipher loosely modeled on the German Enigma machine.

Only 60 Commands at First

The first editions of UNIX systems had just 60 system commands, many of which still exist today, including `ls`, `cd`, `rm`, `mv`, `cp`, and `cat`.

The V6 Manual Was a Masterpiece of Simplicity

The Version 6 UNIX manual (1975) was just a few dozen pages long, yet elegantly described the entire operating system. It became a model for minimalist documentation and is still admired for its clarity and dry wit.

The Fork Bomb: A Powerful Demonstration

A simple line of shell code could crash early UNIX systems by rapidly spawning processes. This "fork bomb" isn't a bug, but a reflection of how process control works.

:(){ :|:& };:
`ed` Still Exists, and `vi` Came From It

`ed` was the original UNIX text editor—minimalist and notoriously challenging to use. It remains available on all conforming UNIX systems and is still used for scripting. Bill Joy created vi as a more user-friendly, visual layered on top of it.

Everything Is a File

A UNIX system treats everything as a file, including your keyboard (`/dev/tty`), disk drives, and even network connections. This elegant design allows for powerful redirection and piping.

Pipes Were Added in One Afternoon

Ken Thompson added pipes (`|`)—one of a UNIX systems most powerful features—in just one day. He and Doug McIlroy had discussed the idea that morning, and by the afternoon it was working, changing shell scripting forever.

Zombie Processes Are Real

In a UNIX system, a zombie process is a dead child process whose parent hasn't yet read its exit status. These “undead” processes are harmless but still occupy a slot in the process table.

The `creat()` System Call Was a Typo

In early UNIX systems, system call names were often limited to 6 characters. To fit "create" into this limit, Ken Thompson dropped the "e":

int creat(const char *pathname, mode_t mode);

"Unix was not designed to stop people from doing stupid things, because that would also stop them from doing clever things."