Short for pseudo-terminal, pty is a pair of virtual devices that provide a bidirectional communication. One end of the channel is called the master or ptm and the other is the slave or pts. The pts provides the pseudo-terminal that acts exactly like a classic terminal and sends input data to the ptm. Output data is sent back from the ptm to the pts. For example, if you connect to a Linux machine over the Internet using SSH, you are creating a pseudo-terminal.