tty
[
options
]
Print the device name of your terminal.
This is useful for shell scripts and often for
commands that need device information.
-
-l
-
Print the synchronous line number.
-
-s
-
Return only the codes: 0 (a terminal), 1 (not a terminal),
2 (invalid options used).