Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

tty (Unix)

From Wikipedia, the free encyclopedia
Command to print the file name of the terminal connected to standard input
For other uses, seeTTY (disambiguation).
tty
tty command on aVoid Linux machine
Initial releaseNovember 3, 1971; 54 years ago (1971-11-03)
Operating systemUnix andUnix-like
PlatformCross-platform
TypeCommand

Incomputing,tty is a command inUnix andUnix-likeoperating systems to print the file name of the terminal connected tostandard input.[1][2]

tty stands for "teletypewriter".[3]

Usage

[edit]

Thetty 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 beingpiped) "not a tty" is printed tostandard output 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. Retrieved2020-02-14.
  2. ^"tty".man7.org.
  3. ^"What does "TTY" stand for?".Ask Ubuntu. Retrieved2020-02-14.
  4. ^"tty(1) - Linux man page".linux.die.net. Retrieved2020-02-14.

External links

[edit]
File system
Text utilities
Shell utilities
Stub icon

ThisUnix-related article is astub. You can help Wikipedia byadding missing information.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Tty_(Unix)&oldid=1310730546"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp