LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2009, 06:52 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Rep: Reputation: 33
'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 
root     :0           2009-04-01 16:11 
root     pts/1        2009-04-01 16:12 (:0.0) 
jonas    pts/2        2009-04-01 16:19 (192.168.x.x)
Can someone explain me what this represents ?


Code:
jonas    pts/2        2009-04-01 16:19 (192.168.x.x)
means that I am logged in via ssh... that I know.

Code:
root     :0           2009-04-01 16:11 
root     pts/1        2009-04-01 16:12 (:0.0)
I am here logged in as normal user 'jonas' normally, but in a terminal window I am doing yum-updates as 'root' user.

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" ??
 
Old 04-04-2009, 08:45 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
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
 
Old 04-04-2009, 11:37 AM   #3
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by AlucardZero View Post
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 referred to as the actual "console".

Copied from this thread
Thanks for the abstract lesson.

Now concrete... what does this then stands for :

Code:
root     :0           2009-04-01 16:11 
root     pts/1        2009-04-01 16:12 (:0.0)
Why is root associated with my physical hardware ":0" ?

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 ??
 
Old 04-04-2009, 06:28 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Quote:
The term console is rather generic. When accessing a Linux system, there are, in fact, several types of “consoles”, all of which seem to have an administrative aspect.

Physical Console

Virtual Console

Serial Console

System Console

Pseudoterminal or pty
from one of the RH manuals. I'm not going to quote the whole page, for copyright reasons. However, if you google or Wikipedia or read the 'man' pages, it'll become clearer(-ish).
For ptys see:

man pty
man pts
man posix_openpt
 
Old 04-05-2009, 04:28 AM   #5
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
who and pts # R254 Linux - Networking 1 04-11-2006 07:07 PM
pts/0... Dessan Linux - Networking 1 01-27-2006 02:17 AM
pts/0, pts/1 devices ?? nadine.mauch Linux - General 1 10-07-2004 12:00 PM
which pts do I use Luskacik Linux - Newbie 0 09-30-2004 11:07 AM
what is pts/# Cichlid Linux - General 2 12-28-2002 12:18 AM


All times are GMT -5. The time now is 02:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration