What are pseudo terminals (pty/tty)?

  1. A device that has the functions of a physical terminal without actually being one. Created by terminal emulators such as xterm. More detail is in the manpage pty(7).
  2. Traditionally, UNIX has a concept of a controlling terminal for a group of processes, and many I/O functions are built with terminals in mind. Pseudoterminals handle, for example, some control characters like ^C.
  3. They are not outdated and are used in many programs, including ssh.
  4. ssh.

The answer is in the name -- "Pseudo" meaning "not genuine but having the appearance of".

With the first terminals, there was always a piece of hardware attached with associated device, be it display hardware or a serial port.

With xwindows, telnet and ssh, there came a need for software "Pseudo devices" to do the job of standing in for display hardware. They are "Pseudo Terminals" ... software that emulates Terminal hardware, handling input and output in the same way a physical device would so that the software connected is not aware there's not a real device attached.


Pseudo-terminals are emulators for serial lines. They provide endpoints for telnet, ssh, and xterm shells.