23.7.08

know your terminal

How to know through which terminal we connected to particular machine or present terminal type.

we have "who -a" commands which list the all the users presently logged in system. but how you will come to know with which terminal presently we connected.

let say the "who -a" output is:

. system boot Jun 30 19:51
. run-level 3 Jun 30 19:51 3 0 S
rc2 . Jun 30 19:54 old 89 id= s2 term=0 exit=0
rc3 . Jun 30 19:54 old 1750 id= s3 term=0 exit=0
LOGIN console Jun 30 19:54 1:53 2225 id= dt term=15 exit=0 (:0)
sac . Jun 30 19:54 old 2443 id= sc
root + console Jun 30 20:40 1:53 2444
sctpd . Jun 30 19:54 old 2447 id= US
start_DF + null Jun 30 19:54 . 2448
sufd_rc_ . Jun 30 19:54 old 2449 id=SUFD
zsmon . Jun 30 19:54 old 2503
.telnet /dev/pts/3 Jul 15 14:24 2349 id=t100 term=0 exit=0
root + pts/3 Jul 22 16:27 . 578 (10.143.64.25)
root pts/2 Jul 22 18:46 old 20139 id=ts/2 term=0 exit=0
.telnet /dev/pts/4 Jul 15 14:21 29587 id=tt/2 term=0 exit=0
.telnet /dev/pts/6 Jul 15 14:21 29594 id=tu/2 term=0 exit=0
root pts/4 Jul 22 18:46 old 5089 id=ts/4 term=0 exit=0

to know with which terminal we connected
use "tty" commnad.

#tty
/dev/pts/3



Use TTY commnad to know on wich terminal u are working now or what is ur terminal.