What is a PTY?

A pseudo-terminal lets a program behave as though it is connected to a real terminal.