Short for pseudoterminal, 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 pseudoterminal 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 pseudoterminal.