By Bobby Jefferson on Sunday, 27 October 2024
Category: Tech News

From Teletype to Terminal Window: The 3 Eras of Unix Terminals

Key Takeaways

Teletypes were the first computer terminals, influencing modern terminals with short commands due to their printing speed limitations. CRT terminals replaced teletypes, introducing terminfo to manage terminal capabilities and are predecessors to modern PCs. Terminal emulators are now most common, remaining crucial in Linux usage.

You might use the Linux terminal every day to enter commands, but have you ever thought about where it came from? There are three eras of computer terminals, and they influence modern terminals today.

Teletype: The Early Days

The first computer terminals for interactive use didn't have screens. They were called teleprinters, or used the brand name Teletype. They were effectively automatic typewriters that could print text received from a remote phone line. They were already widely used for telegraphy because operators didn't have to know Morse code—they could use their fingers instead.

Because printing terminals were already widely used in telegraphy, they were applied to interactive computing when time-sharing operating systems were developed. Instead of punching cards and handing them off to a mainframe computer operator, and then waiting to get your output back, you could type in commands and run programs while getting immediate feedback.

There were a couple of downsides to this kind of terminal. Printing terminals needed to print, and they needed to print on paper. Second, they were slow. This was annoying if you wanted to type commands into a computer, one that could be many miles away.

You can see and hear one being used as a modern Linux terminal:

You'll notice that it's both noisy and takes a long time to print. This affected the design of Unix. Given the slowness of printing terminals, programmers made their command names short such as ls and cd. They were often only a couple of letters long, sometimes one. Three letters seemed excessive. This trend toward short commands persists today. It's also why terminals are also known as TTYs.

Besides Linux terminals, the TTY persists as a device to help deaf and hard-of-hearing people make phone calls, though modern TTY devices have screens instead of printers.

Enter the CRT Terminal

Later in the 1970s, video terminals with CRT screens became popular. There was no more wasted paper, since the characters printed on the screen. And it was easier to write programs, too. There were new editors like Vi and Emacs that showed what you were working on right on the screen.

While video terminals were great, they did have one problem. There were a lot of them, from different manufacturers with different capabilities. At UC Berkeley in the late 1970s, Bill Joy, who created the vi editor, developed a library that could address the capabilities of various terminals on the market with a database of terminal models, according to Unix historian Peter H. Salus.

Francesco Sblendorio/Shutterstock

Termcap was later replaced by the terminfo database, first implemented by Mary Ann Horton to run the ncurses library. This is the library that builds those text user interfaces you see in installation programs and editors today.

These terminals were similar to modern PCs, but all of the processing power was at the minicomputer or mainframe they were connected to, which is why they're referred to as "dumb terminals."

The terminal that the administrator used was called the console, and it was where system messages were displayed and where the administrator managed the machine—root logins were often only allowed on the console.

The console still survives today. On Linux systems, it's the screen and keyboard connected to your PC. You might see boot messages scroll by when you turn your machine on, and if something goes wrong with your desktop environment, you'll be kicked back to the console to fix it at the command line. You can also use multiple virtual consoles. It's like having a full-screen terminal emulator.

The Modern Terminal Emulator Era

Terminal emulators became popular with the advent of graphical user interfaces on Unix-like systems, and they're still the most common way to access a shell. Dedicated hardware terminals have fallen by the wayside, since even the cheapest computers can support a full Linux installation. You can even use Linux terminal emulators on Windows and Chromebook.

A piece of software called a pseudoterminal handles programs started by a terminal emulator. When you resize a terminal window, the pseudoterminal keeps track of how wide or tall the screen and will have the program redraw itself to fit the new window.

While terminal emulators exist on other systems, like the Command Prompt—nicknamed by me and other techies as a "DOS box" even though it's not actually MS-DOS—and PowerShell on Windows, they remain a useful part of Linux. No matter how hard distro makers try to make it so that you don't have to use a terminal, typing in commands seems to be the most common way to get something done.

That's why it's hard to imagine leaving this era. No matter what the future may bring, the terminal will still be a part of Linux.

Original link
(Originally posted by David Delony)
Leave Comments