pseudo-terminal
also: PTY, pseudo-tty, virtual terminal, pts
A software abstraction that emulates a physical terminal, consisting of a master side (controlled by a terminal emulator or SSH daemon) and a slave side (used by a shell or application). It allows text-based communication between programs and users.
A pseudo-terminal (PTY) is a pair of virtual character devices that together simulate a physical terminal connection. The master side is controlled by a program like a terminal emulator (GNOME Terminal, xterm) or SSH server, while the slave side is where a shell process reads input and writes output.
When you type in a terminal window, the terminal emulator captures your keystrokes and sends them to the PTY master, which forwards them to the slave where your shell receives them. Conversely, when your shell prints output, it writes to the PTY slave, which transmits the data back through the master to the terminal emulator for display.
You can see your PTY with the tty command (e.g., /dev/pts/0), and list all active PTYs using ps aux or who. PTYs are essential for SSH sessions, terminal multiplexers like tmux, and any interactive remote access.