macOS / binaries /

tty

/usr/bin/tty
Return user's terminal name

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

source: man