tty


tty

Purpose

Display the device name of the terminal.

Syntax

tty

Options

None

Description

The tty command displays the name of the terminal connected to the standard input. This is useful in shell scripts that may need the terminal name.