Linux tty command

Updated: 11/06/2021 by Computer Hope
tty command

On Unix-like operating systems, the tty command displays the file name of the terminal connected to standard input.

This page covers the GNU/Linux version of tty.

Syntax

tty [OPTION]...

Options

-s, --silent, --quiet Print nothing, only return an exit status.
--help display this help and exit.
--version output version information and exit.

Examples

tty

Running tty by itself displays the current tty session as shown below:

/dev/pts/0

ps — Report the status of a process or processes.