TTY(1)

NAME
tty - get terminal name

SYNOPSIS
tty [-l] [-s]

DESCRIPTION
Tty prints the pathname of the user's terminal. If the -s option is present, nothing is printed, and only the exit status is affected. With the -l option, tty prints the line number if standard input is connected to a synchronous line.

DIAGNOSTICS
`not a tty' if the standard input file is not a terminal.

The exit status is

0   if standard input is a terminal;

1   if standard input is not a terminal;

2   or greater on error.