tty is a Unix command that prints to standard output the name of the terminal connected to standard input. The name of the program comes from teletypewriter, abbreviated "TTY".
When the program runs, it will output something like this:
$ tty
/dev/pts/4
The abbreviation "pts" within the output of the tty command indicates that it is a pseudo terminal, where the terminal's output is being shown by a process on the computer system and not a separate hardware computer terminal. A specific identifying number enumerates the numbers of such processes on that computer system. If the program ...