.TH TTY 1 .SH NAME tty \- get the terminal's name .SH SYNOPSIS .B tty [ .B \-s ] .SH DESCRIPTION .I Tty\^ prints the path name of the user's terminal. The .B \-s option inhibits printing, allowing one to test just the exit code. .SH EXIT CODES 0 if standard input is a terminal, .br 1 otherwise. .SH DIAGNOSTICS ``not a tty'' if the standard input is not a terminal and .B \-s is not specified.