Name

tty

Synopsis

tty [option]

Prints the device name for your terminal. This is useful for shell scripts and commands that need device information. tty exits 0 if the standard input is a terminal, 1 if the standard input is not a terminal, and >1 if an error occurs.

Option

-s

Suppress the terminal name.

Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.