tty
system administrationLinux/Unix
The tty command is one of the most frequently used commands in Linux/Unix-like operating systems. tty Print the file name of the terminal connected to standard input
Quick Reference
Command Name:
tty
Category:
system administration
Platform:
Linux/Unix
Basic Usage:
tty [options] [arguments]
Common Use Cases
Syntax
tty [OPTION]...
Options
Option | Description |
---|---|
-s, --silent, --quiet |
Print nothing, only return an exit status |
--help |
Display help and exit |
--version |
Output version information and exit |
Examples
How to Use These Examples
The examples below show common ways to use the tty
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
# Print the terminal device name
tty