Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 (
atomsfat  pts/2        2011-08-02 09:01 (
atomsfat  pts/4        2011-08-02 09:01 (
atomsfat  pts/5        2011-08-02 11:48 (

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
up vote 1 down vote accepted

You want tty(1).

$ tty
share|improve this answer

Your Answer


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.