'who' gives PTS/*... and I don't understand everything
Maybe a stupid question and definitely a beginners question :
A CentOS-server, named Asterisk. Code:
[jonas@asterisk ~]$ who Code:
jonas pts/2 2009-04-01 16:19 (192.168.x.x) Code:
root :0 2009-04-01 16:11 I don't really understand this output though... I copied this output on Wednesday, april 1 and am looking at it now :-). I have a GNOME-desktop running, so wouldn't it make more sense that this is represented by "pts/0" ?? |
pts stands for pseudo terminal slave. A terminal (or console) is traditionally a keyboard/screen combination you sit and type at. Old UNIX boxes would have dozens of them hanging off the back, all
connected with miles of cable. A pseudo terminal provides just the same facility only without the hardware. In other words, it's an xterm window or a konsole window, or whatever utility you use. They pop into life as you ask for them and get given sequential numbers: pts/0, then pts/1 and so on. The physical console is the hardware which is actually attached to your box - you probably only have one. That's labelled ":0" and is refered to as the actual "console". Copied from this thread |
Quote:
Now concrete... what does this then stands for : Code:
root :0 2009-04-01 16:11 Why is root logged in @ pts/1 ? Is this then Gnome ? Why is there no indication of a pts/0 ?? If pts/1 is a terminal that I opened in Gnome, why is there no pts/0 ?? |
Quote:
For ptys see: man pty man pts man posix_openpt |
I've opened some terminal windows and watched how the pts-number changed. Apparently the count starts with pts/1 because I've closed an earlier terminal session (pts/0).
When opening another terminal window this does not get pts/3 but pts/0. So I understand now... thanks. |
All times are GMT -5. The time now is 04:35 PM. |