Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there anyway to know from what console is an user logged ?

with the who command gives me:

NAME     LINE         TIME             COMMENT
atomsfat  pts/0        2011-08-02 08:52 (172.206.24.244)
atomsfat  pts/2        2011-08-02 09:01 (172.206.24.244)
atomsfat  pts/4        2011-08-02 09:01 (172.206.24.244)
atomsfat  pts/5        2011-08-02 11:48 (172.206.24.244)

And with whoami command just say: atomsfat

How can I get the current console in use in my session ? for example: pts/5

share|improve this question
    
Are you trying to take control over a console already in use? What distribution? more info is required. –  Silverfire Aug 2 '11 at 23:07

1 Answer 1

up vote 1 down vote accepted

You want tty(1).

$ tty
/dev/pts/6
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.