Search notes:

TTY

TTY is the abbrevation of Tele-Typewriter (or Tele-Type)
Originally, a TTY was physically connected to a Unix machine as an input/output device, usually on a RS-232 cable.
The input was fed on a keyboard.
In the beginning, computer's output was going to a printer and later also to screens (CRTS, for example the DEC VT100 terminal)
Later, also the serial port connections were referred to as TTYs.

Terminal devices

A TTY (or terminal) device is a special class of a character device.
A Terminal device might act as a controlling terminal for a session, such as
All registered TTY devices that are present in the kernel are found under /sys/class/tty.
The most important data structure to implement a TTY driver is the struct tty_driver which is found in include/linux/tty_driver.h.

PTY

The PTY is a pseudo TTY: the physical serial connection is replaced with a in-memory software. Thus, it virtualizes a computer's serial communications hardware.

Flip buffer

A flip buffer contains two input buffers. One buffer is used to store data from the TTY while the user reads from the other buffer.
These buffers flip their role when the input-buffer becomes full or the user flushes it.

TODO

VT (as in VT100) stands for video terminal (as opposed to the paper based TTYs).

See also

Linux terminal subsystem
drivers/tty
/dev/tty, /dev/ttyN
/proc/tty
/proc/sys/dev/tty
R function isatty()
PuTTY
The shell commands ps -t, ps -tty and ps t select processes by TTY.

Index