Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux tty command

Linux tty command

Linux Command Reference Linux Command Reference

The Linux tty command is used to display the file name of the terminal connected to standard input.

In Linux operating systems, all peripheral devices have their names and codes, which are stored as special files in the /dev directory. You can execute the tty (teletypewriter) command to query the file name of the currently used terminal.

Syntax

tty [-s][--help][--version]

Parameter Description:

Example

Display the current terminal

# tty

/dev/pts/4

Linux Command Reference Linux Command Reference