The tty command of the terminal basically prints the file name of the terminal connected to standard input. tty is short for teletype, but popularly known as a terminal it allows you to interact with the system by passing on the data (your input) to the system and displaying the output produced by the system.