Pseudo Terminal (PTY) is a pair of virtual character devices that provide a bidirectional communication channel. One end of the channel is called the master and the other end is called the slave. The slave device behaves identical to a physical terminal; the master device is used by a process to read data from and write data to the slave, thereby emulating a terminal.