Each login session has its own
a UNIX device file that handles
input and output for your terminal, window, etc.
Each tty has its own filename.
If you're logged on more than once and other users want to
to you, they need to know which tty to use.
If you have processes running on several ttys, you can tell which process
To do that, run the tty
command at a shell prompt in the window:
You can tell other users to type
Some systems have different kinds of ttys: a few dialup terminals, some
network ports for
, etc. (1.33
You or your system administrator can look in a system file like
to find out which ttys are used for what.
You can use this to make your login setup more automatic.
For example, most network terminals on our computer have names like
single digit or letter.
I have a test in my
that clears the screen and prints a
on all ttys except network:
# Clear screen and print fortune on non-network ttys:
if ("`tty`" !~ /dev/tty[pq]*) then
The GNU version of tty
is on the CD-ROM.