What Does TTY Stand for in Linux?

TTY is a Linux command, used at a command or shell prompt, that gives information about the terminal that a user is currently at. Typing "tty" at a Linux or Unix command prompt will yield a specific output unique to that terminal.

History

  • "TTY" stands for "TeleType," in reference to the first computers, which were TeleType terminals. These terminals were essentially remote-controlled typewriters.

Benefits

  • Typing "tty" at a command prompt on Linux or Unix will give an output that identifies what device in the Linux /dev directory you are using, in only one line.

Fun Fact

  • When TeleType terminals were used, the "tty" command output was not shown on a display, but printed on a printer that was connected to the Teletype machine.

Usage

  • The "tty" command can be used to show the username, /dev device, date and time for the person who is using the computer by typing its sister command, "who am i."

Output Response

  • An example of a "tty" response can be something like "/dev/pts/0", which designates that the user is using device "/pts/0" but does not show any information about this device.


Read more: http://www.ehow.com/facts_5571810_tty-stand-linux.html#ixzz2zQ4oEYNe

其它:http://baike.baidu.com/view/749979.htm
http://www.ehow.com/facts_5571810_tty-stand-linux.html

cyper笔记:
一共有6个虚拟终端,Ctrl+Alt+F(1~6)可以打开, Alt+Left, Alt+Right可以来回切换, Ctrl+Alt+F7切回桌面.
第一个终端对应的文件是/dev/tty1, 可以用tty命令查看当前所处的终端

从桌面打开的终端名为/dev/pts/1, 多打开一个,后面的Number就加1,
向当前终端输出hello可以用echo hello,也可以用echo hello > /dev/pts/1,
也可以给其它Terminal发送消息比如从桌面上的终端向tty1发消息,这样写就可以echo "hello this is from cyper" > /dev/tty1,
此时Ctrl+Alt+F1切过去就会发现屏幕上出现了那些字符

这里有篇不错的文章:http://my.oschina.net/qefarmer/blog/201713

你可能感兴趣的:(linux,tty)