keepcalculator

06 Numbers and Powers

The Three Eras of Unix Terminals

Card No. 06·52131 · Updated · Standard formula, shown below

The three eras of Unix terminals are the hardcopy era (1960s–1970s), the glass terminal era (1970s–1990s), and the modern terminal emulator era (1990s–present). Each era shifted how users interacted with the system, from printed paper to phosphor screens to software windows.

Era 1: Hardcopy Terminals

Before screens were common, Unix users interacted through teleprinters and typewriter-like devices that printed every keystroke and system response on continuous paper. The most famous was the Teletype Model 33 (ASR-33), which ran at 10 characters per second and used uppercase-only text. These devices were slow, noisy, and consumed reams of paper, but they provided a permanent record of the session.

Hardcopy terminals shaped Unix in lasting ways. The ed line editor and the vi editor both assume a character-stream interface, not a full-screen one. Commands like stty and terminal control characters (Ctrl-C, Ctrl-D) were designed around the limitations of mechanical printing. The 80-column width of paper rolls became the default terminal width, a standard that persists in modern terminal emulators.

By the late 1970s, hardcopy terminals were largely replaced by CRTs, but their influence remains in the Unix command-line culture: terse commands, pipe-based workflows, and the assumption that output is a linear stream of text.

Era 2: Glass Terminals

Glass terminals (also called CRT terminals) displayed text on a cathode-ray tube screen instead of paper. The Digital Equipment Corporation VT100 (1978) became the de facto standard, introducing the ANSI escape sequences that modern terminals still use for color, cursor movement, and screen clearing. These terminals allowed full-screen editors like vi and emacs to display a live editing buffer, which was impossible on paper.

Glass terminals were still hardware devices, connected to a Unix host via serial cables (often RS-232). They had no local processing power; every keystroke was sent to the host, and the host sent back characters to display. This client-server model is why Unix terminals are called “dumb terminals”—they only rendered what the host sent.

The VT100’s popularity created a compatibility standard. Terminal emulators today still implement its escape sequences, such as ESC [ 2 J to clear the screen and ESC [ 31 m to set red foreground. The TERM environment variable (e.g., xterm, vt100) tells programs what capabilities the terminal has, a system inherited from this era.

Era 3: Terminal Emulators

Starting in the 1990s, Unix workstations and Linux PCs ran terminal emulators as software windows within a graphical desktop. Instead of dedicated hardware, a program like xterm, GNOME Terminal, or iTerm2 renders a terminal window. The emulator interprets the same escape sequences as a VT100 but adds features like tabs, colors, scrollback, and Unicode support.

Modern terminal emulators run on the local machine, often using a pseudo-terminal (pty) to connect the emulator to a shell like bash or zsh. This allows multiple terminals on one screen, copy-paste, and integration with the graphical clipboard. The TERM variable is usually set to xterm-256color to enable 256-color output.

Today, terminal emulators also support multiplexers like tmux and screen, which let one physical terminal host multiple virtual sessions. SSH connections to remote Unix systems are also handled through terminal emulators, making the local emulator the universal interface to any Unix-like system.

How Terminal Emulation Works

Terminal emulation is a protocol between the emulator and the application. The application (e.g., a shell or text editor) sends a stream of bytes to the terminal. Most bytes are printed as characters, but escape sequences—starting with the ESC byte (0x1B)—are interpreted as commands to move the cursor, change colors, or clear the screen.

For example, the sequence ESC [ 1 ; 31 m sets bold red text. The emulator parses this and updates its internal screen buffer. The buffer is a grid of cells, each holding a character, a foreground color, a background color, and attributes like bold or underline.

The termcap and terminfo databases describe what each terminal type can do. Programs query these databases to decide whether to use cursor addressing, color, or other features. If the TERM variable is set incorrectly, programs may display garbage or fail to render properly.

Common Problems and Misconceptions

A frequent issue is a misconfigured TERM variable, causing programs like vim or htop to display scrambled output. The fix is usually to set TERM to a common value like xterm-256color or screen if inside tmux.

Another misconception is that a terminal emulator is the same as a shell. The shell is a program that runs inside the terminal; the terminal is just the display and input interface. Confusing the two leads to questions like “why does my terminal not have a command?” when the issue is actually the shell configuration.

Unicode and wide characters can also cause alignment issues in text-based interfaces. Programs that assume every character is one cell wide will misalign when a emoji or CJK character is used. Modern emulators handle this better, but legacy applications may still break.

How to Choose a Terminal Emulator

Choosing a terminal emulator depends on your needs:

  • Features: Tabs, split panes, GPU acceleration, and ligature support are common differentiators.
  • Resource usage: Lightweight emulators like st or alacritty use less memory than full-featured ones like GNOME Terminal.
  • Compatibility: Ensure the emulator supports the escape sequences your applications need, especially if you use TUI apps like vim or ranger.
  • Customization: Some emulators allow scripting and theming, which power users may prefer.

For most users, the default terminal that ships with their desktop environment (GNOME Terminal, Konsole, or Windows Terminal) is sufficient. If you need a specific feature like true color support, check the emulator’s documentation before switching.

Frequently Asked Questions

What is the difference between a terminal and a console?

A console is the physical device (keyboard and screen) directly attached to the computer. A terminal is a device or program that connects to a computer over a serial line or network. In modern usage, “terminal” usually means a terminal emulator, while “console” may refer to the virtual consoles accessed with Ctrl+Alt+F1 on Linux.

Why does my terminal show weird characters like ^[[31m?

That is an escape sequence being displayed literally, which happens when the terminal does not interpret it correctly. This usually occurs because the TERM variable is set to a value that does not match the actual terminal capabilities, or because the output was piped through a program that stripped the escape codes. Setting TERM to xterm-256color often fixes it.

What is the best terminal emulator for Linux?

There is no single best choice; it depends on your needs. GNOME Terminal is feature-rich and user-friendly, while alacritty is fast and minimal. For a lightweight option, st from suckless.org is popular. Try a few to see which fits your workflow.

Can I use a terminal emulator to connect to a remote server?

Yes, that is a primary use case. You can run ssh user@server inside any terminal emulator to get a shell on a remote Unix system. The emulator handles the local display, while SSH provides the secure connection.

What is the difference between a terminal emulator and a command prompt?

A command prompt is the text interface where you type commands, usually a shell like bash or PowerShell. A terminal emulator is the window that hosts that prompt. On Windows, the default terminal emulator is Windows Terminal, and the default shell is PowerShell or CMD.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →