TTY(1)
Series 300 and 500 Release 5.2 Implementation
NAME
tty, pty − get the name of the terminal
SYNOPSIS
tty [ −s ]
pty [ −s ]
DESCRIPTION
Tty and pty print the path name of the user’s terminal. The −s option inhibits printing of the terminal path name, and is used to test just the exit code.
RETURN VALUE
0 Standard input is a terminal if tty was invoked or a pseudo-terminal if pty was invoked.
1 Standard input is not a terminal or pseudo-terminal.
2 Invalid options were specified.
DIAGNOSTICS
not a tty Standard input is not a terminal and −s was not specified in the tty command.
not a pty Standard input is not a pseudo-terminal and −s was not specified in the pty command.
Hewlett-Packard Company — May 11, 2021