Unix

The operating system that shaped every OS after it. Born at Bell Labs in 1969, Unix introduced the concepts of hierarchical file systems, pipes, shell scripting, and the philosophy that programs should do one thing and do it well.

What is Unix?

Unix is a family of multitasking, multiuser computer operating systems originally developed at AT&T Bell Labs by Ken Thompson, Dennis Ritchie, and others. Written in C, it became portable across hardware platforms — a revolutionary idea at the time. Today every macOS, Linux, Android, and iOS device traces its lineage to Unix.

Core Concepts

Everything is a File
Devices, sockets, pipes, and processes are all represented as files in the filesystem. One interface rules them all.
Pipes and Filters
Programs are connected via pipes (|). Small tools compose into powerful workflows without any code changes.
Hierarchical Filesystem
A single rooted tree starting at /. Directories, files, and devices all live in one unified namespace.
Shell as First-Class Language
The shell is both a command interpreter and a scripting language. Automation is built in from day one.
Multiuser & Multitasking
Multiple users share one system simultaneously. Processes are isolated with user and group permissions.
Portability
Written in C rather than assembly, Unix could be recompiled for different hardware. This made it spread everywhere.
Process Model
fork() creates a copy of a process; exec() replaces it with a new program. This elegant two-step is still used today.
Standard Streams
stdin, stdout, stderr — every process gets three open file descriptors. Redirection and piping flow from this model.

Unix Standards

POSIX
Portable Operating System Interface — IEEE standard defining the Unix API. Programs written to POSIX run on any conformant OS.
Single UNIX Specification
The Open Group's brand license. Only certified systems may call themselves "UNIX" — macOS, Solaris, AIX, HP-UX qualify.
ANSI/ISO C
Unix drove the standardization of C itself. The C language was created to write Unix, and Unix made C ubiquitous.

Unix Philosophy

Formulated by Doug McIlroy and articulated by Ken Thompson, the Unix philosophy is a set of design principles that made Unix software composable, maintainable, and powerful. Eric Raymond later distilled it into 17 rules in The Art of Unix Programming.

The Three Core Rules (McIlroy)

Eric Raymond's 17 Rules

Unix Timeline

From a discarded space travel game to the foundation of modern computing — 55+ years of Unix history.

1964
Multics
Bell Labs, MIT, and GE begin the Multics project — a time-sharing OS. Bell Labs eventually withdraws. The lessons learned directly inspire Unix.
1969
Unix Born at Bell Labs
Ken Thompson writes the first Unix on a discarded PDP-7 to run Space Travel, a game he'd written. Dennis Ritchie joins. The name "Unix" — a pun on Multics — is coined by Brian Kernighan.
1971
Unix Version 1 & The Manual
First edition of the Unix Programmer's Manual published. Unix runs on PDP-11 hardware. Used internally by Bell Labs for text processing.
1972–73
Unix Rewritten in C
Dennis Ritchie develops the C programming language. Unix is rewritten in C — making it portable across different hardware platforms for the first time.
1975
Unix Version 6 — Public Release
First Unix widely distributed outside Bell Labs. Licensed to universities for a nominal fee. UC Berkeley receives a copy and begins major modifications.
1977
BSD Begins
Bill Joy at UC Berkeley releases the first Berkeley Software Distribution (1BSD), adding the Pascal compiler and the ex editor to Unix V6.
1979
Unix Version 7
The last universally distributed version of Research Unix. Considered the definitive "classic" Unix. Includes C, awk, sed, make, and the Bourne shell.
1983
4.2BSD & TCP/IP
Berkeley releases 4.2BSD with a complete TCP/IP stack implementation. This becomes the networking foundation of the early internet.
1983
System V Release 1
AT&T releases Unix System V — the official commercial Unix. System V and BSD become the two main Unix branches, diverging significantly.
1984
GNU Project Founded
Richard Stallman launches GNU — a free Unix-compatible OS. GNU tools (gcc, glibc, bash, etc.) become the userland of Linux years later.
1987
MINIX
Andrew Tanenbaum creates MINIX, a Unix-like OS for educational use. It directly inspires Linus Torvalds to create Linux four years later.
1988
POSIX Standard
IEEE publishes POSIX — a standard that unifies Unix interfaces and allows software to be portable across Unix variants.
1991
Linux 0.01
Linus Torvalds releases Linux 0.01 on a Usenet post: "Just a hobby, won't be big and professional." It becomes the most deployed OS kernel in history.
1993
FreeBSD, NetBSD, OpenBSD
The legal dispute between AT&T and BSDI is settled. FreeBSD 1.0 and NetBSD 0.8 are released. BSD splits into three major open source projects.
1999
Unix Turns 30
Thompson and Ritchie receive the National Medal of Technology from President Clinton for their work on Unix and C.
2001
Mac OS X
Apple releases Mac OS X, built on a Unix foundation (Darwin/XNU, derived from NeXTSTEP and BSD). It is certified UNIX in 2007.
2007
iOS — Unix in Your Pocket
Apple's iPhone runs a Unix kernel. Android (2008) runs Linux. Together they put Unix in billions of pockets worldwide.
2011
Dennis Ritchie Dies
Dennis Ritchie, creator of C and co-creator of Unix, dies at age 70. His contributions underpin virtually all modern computing.
2019
Unix Turns 50
Five decades since that PDP-7 experiment. Unix runs satellites, stock exchanges, the ISS, submarines, and every smartphone on earth.

Unix Commands

The original Unix command set, refined over 55 years. These tools form the foundation of every Unix-like system in the world.

File System

ls
List directory contents
ls -lah /etc
cd
Change directory
cd /var/log
pwd
Print working directory
pwd
mkdir
Make directories
mkdir -p a/b/c
rmdir
Remove empty directories
rmdir tmp/
cp
Copy files and directories
cp -r src/ dst/
mv
Move or rename files
mv old.txt new.txt
rm
Remove files
rm -rf build/
find
Search for files
find . -name "*.log"
ln
Create hard/soft links
ln -s /usr/bin/foo foo
chmod
Change file permissions
chmod 755 script.sh
chown
Change file owner
chown root:root file
stat
Display file status
stat /etc/passwd
du
Disk usage of files
du -sh /var
df
Disk free space
df -h
mount
Mount a filesystem
mount /dev/sdb1 /mnt

Text Processing

cat
Concatenate and print files
cat /etc/hosts
grep
Search text with patterns
grep -r "error" /var/log
sed
Stream editor
sed 's/foo/bar/g' file
awk
Pattern-action text processing
awk '{print $1}' log
sort
Sort lines of text
sort -n numbers.txt
uniq
Filter duplicate lines
sort file | uniq -c
cut
Cut sections from lines
cut -d: -f1 /etc/passwd
paste
Merge lines of files
paste file1 file2
tr
Translate characters
tr 'a-z' 'A-Z'
wc
Word, line, char count
wc -l file.txt
head
First N lines of file
head -20 log
tail
Last N lines of file
tail -f /var/log/syslog
diff
Compare files line by line
diff old.txt new.txt
tee
Write to stdout and files
cmd | tee output.log
xargs
Build and run commands
find . | xargs grep foo

Process Management

ps
List running processes
ps aux
top
Live process monitor
top
kill
Send signal to process
kill -9 1234
killall
Kill by process name
killall nginx
nice
Set scheduling priority
nice -n 10 cmd
nohup
Run immune to hangups
nohup ./server &
wait
Wait for job completion
wait $!
fg / bg
Foreground / background job
bg %1

Networking

ssh
Secure remote shell
ssh user@host
scp
Secure copy over SSH
scp file user@host:/tmp
curl
Transfer data via URLs
curl -s https://api.io
wget
Download files from web
wget https://example.com
ping
ICMP reachability test
ping google.com
netstat
Network connections & stats
netstat -tlnp
traceroute
Trace packet route
traceroute google.com
nslookup
DNS lookup utility
nslookup ximg.app

System Information

uname
OS name and version
uname -a
whoami
Current user name
whoami
id
User and group IDs
id username
uptime
How long system has run
uptime
date
Print or set date/time
date '+%Y-%m-%d'
env
Print environment variables
env | grep PATH
which
Find command in PATH
which python3
man
Manual pages
man grep

Unix Family Tree

Unix spawned a sprawling family of operating systems. Every major OS in use today — from macOS to Android to the world's servers — descends from or was inspired by the original 1969 Bell Labs system.

Research Unix (Bell Labs)

Research Unix V1–V7
Bell Labs 1969–79
The original. Written by Thompson, Ritchie & others. V7 (1979) is the last Research Unix — the definitive classical Unix.
Plan 9 from Bell Labs
Bell Labs 1992
The spiritual successor to Unix from the same team. Everything is truly a file, including the network. Influenced Go's design.

AT&T / System V Branch

UNIX System V
AT&T 1983
The official commercial Unix. System V Release 4 (1989) merged BSD features. Basis for Solaris, HP-UX, and AIX.
Solaris / illumos
Sun/Oracle 1992
Sun's SVR4 Unix, famous for ZFS and DTrace. Oracle acquired it in 2010. The open source fork is illumos.
HP-UX
HP 1984
Hewlett-Packard's certified UNIX, running on PA-RISC and Itanium hardware for enterprise computing.
IBM AIX
IBM 1986
IBM's enterprise Unix for POWER architecture. Still widely deployed in banking and critical infrastructure.

BSD Branch

BSD (Berkeley)
UC Berkeley 1977
Bill Joy's additions to Unix V6. Added TCP/IP stack (4.2BSD), vi editor, csh, and virtual memory.
FreeBSD
1993 → present
The most widely deployed BSD. Netflix, WhatsApp, PlayStation OS, and many CDNs run on FreeBSD.
OpenBSD
1996 → present
Security-focused BSD. Created OpenSSH (used on every server in the world). Default-secure since day one.
NetBSD
1993 → present
Portability-first BSD. Runs on more hardware platforms than any other OS — from ARM to SPARC to VAX.
macOS / iOS
Apple 2001
Built on Darwin (XNU kernel), which merges Mach microkernel with FreeBSD. Certified UNIX. Powers all Apple devices.

Linux Branch

Linux Kernel
Torvalds 1991
POSIX-compatible Unix-like kernel. Dominates servers, clouds, supercomputers (100% of Top500), and Android devices.
Debian / Ubuntu
1993 / 2004
The dominant Linux family for servers and desktops. Ubuntu made Linux accessible to millions of new users.
Red Hat / Fedora / CentOS
1994 → present
Enterprise Linux. RHEL runs vast portions of the Fortune 500. Fedora is the upstream bleeding-edge variant.
Android
Google 2008
Linux-based mobile OS. Runs on 3+ billion active devices — the most widely deployed OS variant in history.

People of Unix

The minds behind the most influential operating system ever written.

Ken Thompson
Ken Thompson
Co-creator of Unix, co-creator of C, creator of Go
Wrote the first Unix kernel in three weeks on a discarded PDP-7, building it to run a space travel game. Also designed the B programming language (predecessor to C), grep, and the UTF-8 encoding. Later created Go at Google.
Dennis Ritchie
Dennis Ritchie
Co-creator of Unix, creator of C
Created the C programming language, which enabled Unix to be rewritten portably. Authored "The C Programming Language" (K&R) with Kernighan. Received the Turing Award and National Medal of Technology.
Brian Kernighan
Brian Kernighan
Co-authored K&R C, named Unix, co-created AWK
Coined the name "Unix" as a pun on Multics. Co-authored "The C Programming Language" and "The Unix Programming Environment." Created AWK with Al Aho and Peter Weinberger.
Doug McIlroy
Doug McIlroy
Invented Unix pipes, formulated Unix philosophy
Created Unix pipes — the core mechanism that enables the Unix philosophy of composable tools. His 1964 memo proposing pipes was the seed of the Unix design philosophy.
Bill Joy
Bill Joy
Co-founder of Sun, creator of BSD, vi, csh, NFS
At UC Berkeley, rewrote the Unix TCP/IP stack (4.2BSD) that became the internet's networking foundation. Created vi and the C shell. Later co-founded Sun Microsystems.
Linus Torvalds
Linus Torvalds
Creator of Linux, creator of Git
Wrote the Linux kernel in 1991 as a hobby project inspired by MINIX. Linux now runs 100% of the world's top 500 supercomputers, most cloud servers, and every Android phone.
Richard Stallman
Richard Stallman
Founder of GNU, creator of GPL, FSF
Launched the GNU Project in 1983 to create a free Unix-compatible OS. Created GCC, Emacs, and the GPL license. His GNU tools + Linux kernel form GNU/Linux.
Andrew Tanenbaum
Andrew Tanenbaum
Creator of MINIX, microkernel pioneer
Created MINIX in 1987 for education — the OS that directly inspired Linus Torvalds to create Linux. Author of "Modern Operating Systems," a foundational CS textbook.
Theo de Raadt
Theo de Raadt
Founder of OpenBSD and OpenSSH
Founded OpenBSD in 1996, creating the world's most security-focused OS. OpenSSH — used on virtually every Unix server — is an OpenBSD project.
Kirk McKusick
Kirk McKusick
BSD pioneer, creator of FFS, TCP/IP contributor
Created the Fast File System (FFS/UFS) at Berkeley. Key architect of 4.3BSD. Still active in FreeBSD development. Co-authored the BSD daemon logo.