Linux and Unix tty command

Quick links

About tty
Syntax
Examples
Related commands
Linux and Unix main page

About tty

Print the file name of the terminal connected to standard input.

Syntax

tty [OPTION]...

-s, --silent, --quietPrint nothing, only return an exit status.

Examples

tty

Running tty by itself will display the current tty session as shown below.

/dev/pts/0

Related commands

ps