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

Examples

tty

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

  • Syntax
  • Options
  • Examples
  • Related commands
  • Linux commands help

/dev/pts/0

ps — Report the status of a process or processes.