tty - print the terminal device name
$ tty
tty prints the file name of the terminal device connected to standard input.
tty
$ tty /dev/pts/0
stty