Skip to main content

Unix vs Linux: The history of how Unix started and influenced Linux

Many of the commands in 1972's Unix 2nd edition are still used in today's Linux. Learn how Unix started and how it's changed over time.
Image
Ken Thompson (sitting) and Dennis Ritchie at PDP-11

Photo by Peter Hamer via Wikimedia Commons, CC BY-SA 2.0

Today, we think of Unix as Linux, and many people view the original Unix through a Linux lens. But Unix has a long history, and what Unix looks like has changed over time. When we talk about "what was it like in the early days of Unix," we don't really have a solid idea because how we work has changed so much since then.

[ Learn more about the history of computing in the Command Line Heroes podcast. ]

From prototype to early Unix

Take a look back at how Unix started. In 1969, Ken Thompson, a researcher at Bell Labs, was experimenting with operating system designs. Bell Labs had a PDP-7 computer with an interesting peripheral device: a very fast (for the time) disk drive. Ken experimented by writing a custom interface to maximize throughput for the drive.

At some point, Ken realized he had put so much work into the interface that it was almost an operating system itself. Thompson figured he needed three more weeks to make it into a prototype operating system: one week each to write an editor, an assembler, and a kernel.

That prototype was the start of the Unix system.

How to fix a "Command not found" error in Linux. ]

That early prototype operating system turned out to be a pretty neat idea. And over time, Thompson and others at Bell Labs added new programs to it, with the overall design pattern that every program should be small and do one thing really well. The new system was dubbed Unix, a play on the name Multics, a failed project that Bell Labs had participated in with MIT and GE a few years before.

Growth of early Unix

By November 1971, Bell Labs collected the programs and released Unix 1st Edition, followed by Unix 2nd Edition in July 1972. These early versions of Unix aren't too far off from today's Linux systems.

Many of the commands that we rely on every day in Linux were already present in Unix 2nd edition, including cat, chdir (like cd), chmod, chown, cmp, cp, date, df, du, echo, find, ln, ls, man, mkdir, mount, mv, rm, rmdir, sort, umount, wc, and who. And a few other commands that still exist but aren't often used, such as ar (archive), dc (desktop calculator), ed (editor), and sum (checksum of file). Unix 2nd Edition also supported early versions of email and instant messages, with mail (email), mesg, and write (messages to users.)

Programmers had a variety of compilers and tools to help them write new programs, including as (assembler), bas (BASIC programming), cc (C compiler), db (debugger), fc (FORTRAN compiler), ld (linker), nm (name list), od (octal dump), strip, and un (find undefined symbols.) You may recognize these tools on today's Linux systems, although we might use slightly different names for them, such as gcc for compiling C programs.

Some Unix commands changed names over time, but you might still recognize their earlier predecessors in Unix 2nd Edition. Programs like the sh shell (supporting early versions of : labels, goto, and if), check and salv (like fsck), dsw (like rm -i), istat (inode status), m6 (an early macro processor, the predecessor to today's m4), and tm (system time information, similar to uptime and other modern commands).

Other commands were relics of their time, dedicated to systems that no longer exist. For example, the Unix 2nd Edition manual defines tools to communicate with a Honeywell 6070 mainframe, including dpd (data phone daemon), tss (Honeywell 6070's time-sharing system), and opr (print files "offline" to the Honeywell 6070).

[ Keep your most commonly used commands handy with the Linux commands cheat sheet. ]

Processing text

Unix quickly became a popular platform inside Bell Labs, so Thompson looked for more powerful hardware to run the new system. Unfortunately, management didn't want to invest in operating system research, having felt burned by the failed Multics project. But the small Unix team found a workaround.

The Patents department was about to purchase a new computer system they could use to write patent applications. However, the new software wouldn't be ready right away. The Unix team made a counterproposal: buy a new PDP-11 for the Labs to develop the next version of Unix, and in turn, the Unix team would update the roff text processing system to support the necessary features to write patent applications.

And that's why Unix 2nd Edition also included a range of document processing and printing tools including nroff (the "new version of roff"), ov (overlay printed pages), pr (print preprocessor), and type (print to a teletype).

[ Learn how to manage your Linux environment for success. ]

Later, when the Labs purchased a typesetter, the nroff typesetting program was updated with new features. troff (the "typesetter version of roff") first appeared in Unix 4th Edition in 1973. Other text formatting tools supported troff, such as eqn to generate equations and tbl to create tables.

Other now-familiar text processing tools wouldn't appear in Unix until later revisions. Notably, the ability to send the output of one command into another (using pipes) didn't appear until Unix 3rd Edition in 1973. With pipes came new programs to act as filters, including grep (Unix 4th Edition, 1973) and tee (Unix 5th Edition, 1974). The early Unix shell was still quite primitive and wouldn't be replaced with a more feature-rich Bourne Shell until Unix 7th Edition in 1979.

Unix roots in Linux

I find this "computer archeology" fascinating. We don't often think about the origins of the Linux commands we use every day. These commands originated in a simpler time when computer memory was measured in kilobytes, so the tools needed to be small in size and focused in nature.

To be sure, Unix from 50 years ago lacked the breadth of command-line options that we enjoy today. For example, the modern ls command advertises 60 different command line options, while ls from Unix 2nd edition supported just five. But it clearly showed promise, even in the early days, and quickly grew.

Today, every Unix system can trace its ancestry back to the original Unix. That includes Linux, which uses GNU tools that are based on Unix documentation. Linux is definitely far removed from its Unix roots, supporting modern architectures and sporting a range of useful modern tools, but the core command-line experience is still quite similar to Unix of the 1970s. The next time you use ls to list files on your server, consider that you're using a command from 50 or more years ago. And it's still going.

[ Get the guide to installing applications on Linux. ]

Topics:   Linux   Programming  
Author’s photo

Jim Hall

Jim Hall is an open source software advocate and developer, best known for usability testing in GNOME and as the founder + project coordinator of FreeDOS. More about me

Try Red Hat Enterprise Linux

Download it at no charge from the Red Hat Developer program.