Manual Page Result
0
Command: tty | Section: 1 | Source: UNIX v10 | File: tty.1
TTY(1) General Commands Manual TTY(1)
NAME
tty, logtty - get terminal name
SYNOPSIS
tty [ -s ]
logtty
DESCRIPTION
Tty prints the pathname associated with the standard input file if it
can be found in the directory, and a unique string if the file is a
pipe, otherwise. Option suppresses output, returning exit status only.
Logtty prints the pathname associated with the terminal on which the
current session was logged in. If the login terminal can't be found,
is printed.
In a mux(9.1) window, tty reports the name of the window, while logtty
reports the name of the terminal. But see BUGS.
SEE ALSO
who(1)
DIAGNOSTICS
Exit status is 0 if a real pathname was printed, 1 for or 2 for a pipe.
BUGS
Mounting something atop the login terminal hides it from logtty. Vis-
mon(9.1) does this.
Try
TTY(1)