TTY(1)
NAME
tty − get terminal name
USAGE
tty [ −s ]
DESCRIPTION
Tty prints the pathname of your terminal, unless you specify the −s option. In either case, the exit value is 0 if the standard input is a terminal, and 1 if it is not.
DIAGNOSTICS
“not a tty” if the standard input file is not a terminal.