Fundamentals 15 min read

What Exactly Is a Terminal? From Early Mainframes to Linux Device Files

The article explains the concept of a terminal—any hardware or software that provides input and output for a computer—tracing its evolution from massive early consoles through multi‑user time‑sharing systems to modern Linux device files like /dev/tty, /dev/ptmx, and remote SSH sessions.

ITPUB
ITPUB
ITPUB
What Exactly Is a Terminal? From Early Mainframes to Linux Device Files

Every day Linux users work with Bash, yet the notion of a "terminal" often feels vague; fundamentally, a terminal is the set of devices that display a computer's output and accept its input, such as a monitor and keyboard attached to a machine.

Beyond the local monitor/keyboard, terminals can appear as serial consoles, where a remote computer's display and keyboard are accessed via a serial port, or as software programs like SecureCRT that use SSH or Telnet over TCP/IP to connect to a host.

Historically, the first computers filled entire rooms and featured a single control console—essentially the original terminal—where operators entered commands and observed results. With the advent of multi‑user, time‑sharing systems, multiple independent terminals were needed, giving rise to the login mechanism that binds a user to a specific terminal.

In the personal‑computer era, the computer and terminal became a one‑to‑one pair: a PC with its own monitor and keyboard. More recently, the concept has expanded to include all‑in‑one devices, touchscreens, and, ultimately, cloud‑based services accessed via apps, which act as modern terminals.

The core principle remains: any entity that can provide input to and display output from a computer functions as a terminal, regardless of its physical location.

Linux implements terminals through device files. Local terminals are represented by /dev/tty1/dev/tty63; the currently active one is the "focus terminal," switchable with key combinations like Fn‑Alt‑F4. The global variable /dev/console always points to the focus terminal, while /dev/tty refers to the terminal of the calling process.

Serial terminals use names such as ttyS0, ttyS1, etc. Pseudo‑terminals, which have no physical hardware, are created via /dev/ptmx (the master) and /dev/pts/X (the slaves). When an SSH client connects, sshd forks a child process, opens a /dev/pts/N device, pairs it with /dev/ptmx, and tunnels the data over TCP/IP.

Typical terminal categories are:

Local terminal : VGA‑connected monitor and PS/2 or USB keyboard.

Serial remote terminal : Host connected via a serial cable, using programs like Windows "Super Terminal".

TCP/IP remote terminal : Telnet, SSH, etc.

The first two are physical terminals; the third is a pseudo‑terminal that does not directly bind to hardware.

Understanding these device files demystifies the Linux /dev directory: they are merely interfaces to a few underlying hardware or virtual devices (display‑keyboard kits, serial ports, or virtual network interfaces).

Finally, the login process involves getty, which repeatedly prompts for a username and password. Upon successful authentication, init spawns a shell (e.g., Bash) on the acquired terminal— /dev/pts/X for SSH sessions or /dev/ttyN for local logins.

LinuxSSHterminalTTYPseudo‑terminalDevice Files
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.