stories-matter Linux like original Unix

Enjoy this look back at what it was like to create technical documents on Unix from 50 years ago.

We don't give much thought these days about what "Unix" really means. The mantra is that "Linux is Unix," but the reality is that Linux outgrew its Unix roots a long time ago. But you can still find the remnants of the original Unix in Linux, if you know where to look.

I recently spoke about the history of Unix at a live stream event hosted by Jeff Brace from the Vintage Computer Federation. In this presentation, I reviewed the history of Unix from an early technical writing platform. If you don't know the story, I'll share it briefly here.

A brief history

Ken Thompson was a researcher at Bell Labs. Thompson wanted to experiment with the throughput of a hard drive, and after working on a program to drive the story, Ken realized that he was about three weeks away from a full operating system. He only needed three critical components: one week each to write an editor, an assembler, and a kernel. Three weeks later, Thompson had created the first "proto Unix" system.

Thompson and others created tools to run on the new system, releasing Unix 1st Edition in 1971. After further updates, including the first-ever C compiler, the team released Unix 2nd Edition in 1972. The invention of pipes, which allowed users to send the output of one program into the input of another program, was the key feature in Unix 3rd Edition in 1973. The first public view of Unix was Unix 4th Edition, in November 1973. Other editions followed in 1974, 1975, 1979, 1985, 1986, and 1989.

Technical writing on Unix

From the start, Unix provided tools for technical writing. The first proto Unix included a program called roff, which was a reimplementation of Jerry Saltzer's RUNOFF program that used abbreviated commands. The shortened name roff reflected the use of the abbreviated formatting commands, such as .ce to center lines, .ll to define a line length, and .po to set the page offset (effectively, the left margin).

The Unix team partnered with the Patents team at Bell Labs to acquire a PDP-11 computer, which drove the release of Unix 1st Edition. As part of that deal, the Unix team updated the roff program to support special formatting necessary for writing patent applications. The new nroff program (the name literally means new roff) was a powerful tool in technical writing, and remained the standard document preparation system until Bell Labs acquired a phototypesetter and updated nroff to become troff, the typesetter version of roff.

In the early days of Unix, the Bell Labs team used Teletype terminals, such as the Model 33 and later the Model 37. These were typewriter-like devices that printed output to a long roll of paper that fed into the back of the machine, around a platen, and out the top of the terminal to fall behind it. Every character entered into the Teletype terminal was echoed back on paper; program output was also printed on paper. Users could load standard US Letter pages into the terminal for printing on individual sheets.

The Teletype Model 37 printed text at 72 characters per line. At ten characters per inch (a measurement unit called "Pitch") and six lines per inch, this was short of the full width of a US Letter page (85 characters wide at 10 Pitch). Printing output to a US Letter page required centering the page into the terminal paper feed, and setting the document's line length and page offset appropriately to balance the left and right margins. Another program called type simulated "typing" of the document to the Model 37; after printing 66 lines, the program would wait while the operator loaded a new page then pressed the Return key.

A live demonstration

In the live stream event, I simulated what it was like to write documents using Unix 3rd Edition (1973) from 50 years ago. However, it's easier to demonstrate computer history using a modern Linux system with a standard video display terminal, rather than a Teletype, so my demonstration assumed an electronic terminal. The first such video display devices appeared in 1969, and the popular VT52 terminal in 1974 (one year after the "target year" of 50 years ago). I simulated the video terminal using a Linux application called Cool Retro Term, which can emulate several popular "retrocomputing" terminal styles.

The standard editor in Unix 3rd Edition was ed, the line editor. Editing files with ed meant entering instructions to the editor when in command mode, and entering text into a file when in edit mode. For example, ed started in command mode, and the user might type i to enter edit mode to insert text into a file. After entering new text, the user typed . on a line by itself to stop inserting lines and re-enter command mode.

In the live stream event, I used a modern Linux system to demonstrate how technical writers would use Unix in 1973 to create documents with the ed editor and format them for printing using the nroff program. All the tools from the original Unix still exist in modern Linux. To mimic printing to a Teletype-like terminal, I used two overlapping Linux terminals that were configured to different heights and widths: one terminal was 66 lines long and 85 columns wide, the other was both 67 lines long and 67 columns wide. This allowed me to demonstrate printing documents to US Letter pages using a Model 37 terminal. (During the live stream, I misremembered the printing width of the Model 37.)

Thanks to Jeff Brace and the Vintage Computer Federation for hosting the live stream event, which you can watch below on their YouTube channel. I hope you enjoy this look back at what it was like to work on Unix from 50 years ago.