Hubbry Logo
search button
Sign in
Tty (Unix)
Tty (Unix)
Comunity Hub
arrow-down
History
arrow-down
starMore
arrow-down
bob

Bob

Have a question related to this hub?

bob

Alice

Got something to say related to this hub?
Share it here.

#general is a chat channel to discuss anything related to the hub.
Hubbry Logo
search button
Sign in
Tty (Unix)
Community hub for the Wikipedia article
logoWikipedian hub
Welcome to the community hub built on top of the Tty (Unix) Wikipedia article. Here, you can discuss, collect, and organize anything related to Tty (Unix). The purpose of the hub is to connect people, fos...
Add your contribution
Tty (Unix)
tty
Initial releaseNovember 3, 1971; 53 years ago (1971-11-03)
Operating systemUnix and Unix-like
PlatformCross-platform
TypeCommand

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.[1][2]

tty stands for "teletypewriter".[3]

Usage

[edit]

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

[edit]

References

[edit]
  1. ^ "tty". pubs.opengroup.org. Retrieved 2020-02-14.
  2. ^ "tty". man7.org.
  3. ^ "What does "TTY" stand for?". Ask Ubuntu. Retrieved 2020-02-14.
  4. ^ "tty(1) - Linux man page". linux.die.net. Retrieved 2020-02-14.
[edit]