Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
tty (Unix)
Command to print the file name of the terminal connected to standard input

In computing, tty is a command in Unix and Unix-like operating systems to print the file name of the terminal connected to standard input.

tty stands for TeleTYpewriter.

We don't have any images related to tty (Unix) yet.
We don't have any YouTube videos related to tty (Unix) yet.
We don't have any PDF documents related to tty (Unix) yet.
We don't have any Books related to tty (Unix) yet.
We don't have any archived web articles related to tty (Unix) yet.

Usage

The tty command is commonly used to check if the output medium is a terminal. The command prints the file name of the terminal connected to standard input. If no file is detected (in case, it's being run as part of a script or the command is being piped) "not a tty" is printed to stdout and the command exits with an exit status of 1. The command also can be run in silent mode (tty -s) where no output is produced, and the command exits with an appropriate exit status.4

See also

References

  1. "tty". pubs.opengroup.org. Retrieved 2020-02-14. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/tty.html

  2. "tty". man7.org. https://man7.org/linux/man-pages/man1/tty.1.html

  3. "What does "TTY" stand for?". Ask Ubuntu. Retrieved 2020-02-14. https://askubuntu.com/questions/481906/what-does-tty-stand-for

  4. "tty(1) - Linux man page". linux.die.net. Retrieved 2020-02-14. https://linux.die.net/man/1/tty