Section 4.15. Identifying Terminals: tty


[Page 150 (continued)]

4.15. Identifying Terminals: tty

The tty utility identifies the name of your terminal (Figure 4-31).


[Page 151]

Figure 4-31. Description of the tty command.

Utility: tty

tty displays the pathname of your terminal. It returns zero if its standard input is a terminal; otherwise, it returns 1.


In the following example, my login terminal was the special file "/dev/pts/1":

$ tty       ...display the pathname of my terminal. /dev/pts/1 $ _ 





Linux for Programmers and Users
Linux for Programmers and Users
ISBN: 0131857487
EAN: 2147483647
Year: 2007
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net