Terminal, shell, TTY and console explainer

Paste what `tty` printed — /dev/pts/3, /dev/tty2, /dev/ttyS0, /dev/tty, /dev/console, or “not a tty” — and see which layer you are actually looking at, what is holding the other end, and what that implies for signals, job control and what happens when the window closes. Local and offline.

Operations & Fieldcraft

The four words, in one line each

terminal
A program that draws characters and sends keystrokes — or, once, a machine that did. It has no idea what a command is.
shell
A process like any other, reading lines and running programs. The kernel gives it no special status whatsoever.
tty
The kernel object between the two, doing line editing, echo, and turning Ctrl+C into a signal. This is where the behaviour lives.
console
A particular terminal: the one attached to the machine itself, and where the kernel prints when nothing else exists yet.

Run `tty` in a shell and paste what it prints, or pick one of the examples.

API endpointGEThttps://ronutz.com/api/v1/terminal-stack-explainerDocumented, not served. Opens the specification.

Referenser

Who uses this