Linux tty command

Updated: 04/26/2017 by Computer Hope

About tty

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

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.

tty examples

tty

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

/dev/pts/0

ps — Report the status of a process or processes.