Linux tty command
The Linux tty command is used to display the file name of the terminal connected to the standard input device.
In the Linux operating system, all peripheral devices have their names and codes, and these names and codes are stored in the /dev directory as special file types. You can execute the tty (teletypewriter) command to query the file name of the terminal currently in use.
Syntax
tty [-s][--help][--version]
Parameter description:
- -s, --silent, or --quiet Do not display any information, only return the status code.
- --help Online help.
- --version Display version information.
Examples
Display current terminal
# tty /dev/pts/4Other Extensions
Linux Command Encyclopedia