tty

Return user's terminal name

Syntax
      tty [-s]

Options
   -s	     Don't write the terminal name; only the exit status is affected
	     when this option is specified.  The -s option is deprecated in
	     favor of the `test -t 0' command.    

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.

“Behind every great fortune there is a crime” - Honore de Balzac

Related:

tty man page - Apple.com
env - Display, set, or remove environment variables
id - Print user and group id's
uname - Print system information
users - Print login names of users currently logged in
who - Print who is currently logged in
whoami - Print the current user id and name (`id -un')



Back to the Top

© Copyright SS64.com 1999-2012
Some rights reserved