tty.1 (746B)
- .\" utils-std: Collection of commonly available Unix tools
- .\" Copyright 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- .\" SPDX-License-Identifier: 0BSD
- .Dd 2024-03-16
- .Dt TTY 1
- .Os
- .Sh NAME
- .Nm tty
- .Nd return pathname of current terminal
- .Sh SYNOPSIS
- .Nm
- .Sh DESCRIPTION
- .Nm
- prints the name of the terminal used for standard input, or if not a terminal prints "not a tty\n" and exits 1.
- .Sh EXIT STATUS
- .Bl -tag -width >1
- .It 0
- Standard input is a terminal.
- .It 1
- Standard input is not a terminal.
- .It >1
- An error occurred.
- .El
- .Sh SEE ALSO
- .Xr ttyname 3
- .Sh STANDARDS
- .Nm
- should be compliant with the
- IEEE Std 1003.1-2024 (“POSIX.1”)
- specification.
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+utils@hacktivis.me