*** Welcome to piglix ***

Pseudo terminal


In some operating systems, including Unix, a pseudoterminal, pseudotty, or PTY is a pair of pseudo-devices, one of which, the slave, emulates a real text terminal device, the other of which, the master, provides the means by which a terminal emulator process controls the slave.

Pseudoterminals were present in the DEC PDP-6 Timesharing Monitor at least as early as 1967, and were used to implement batch processing. They are described in the documentation for the succeeding TOPS-10 on the PDP-10. Other DEC operating systems also had PTYs, including RSTS/E for the PDP-11, as did the third-party TENEX operating system for the PDP-10.

Unix pseudoterminals originated in 1983 during the development of Eighth Edition Unix and were based on a similar feature in TENEX. They were part of the 4.2 release of BSD. AT&T's System V included support for pseudoterminals as a driver in their STREAMS device model, along with the pseudoterminal multiplexer.

The Linux Programming Interface from 2010 contains an entire chapter (chapter 64 "Pseudoterminals" p1375–1399.) explaining pseudoterminals. Then there is another one, Chapter 62 "Terminals", dedicated to terminals.

The role of the terminal emulator process is:

The terminal emulator process must also handle terminal control commands, e.g., for resizing the screen. Widely used terminal emulator programs include xterm, GNOME Terminal, Konsole, and Terminal. Remote login handlers such as ssh and telnet servers play the same role but communicate with a remote user instead of a local one. Also consider programs such as expect.


...
Wikipedia

...