/usr/bin/tty
The tty utility writes the name of the terminal attached to standard input to standard output.