Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

To expand on this question: users command lists 5 of the same users...what are they doing?

How can I track down what each user is doing or what service/app/request spawned another login of that user?

EDIT: answer from the previous post offers the solution of using who which is useful to see where the user is. Still, any way to see what?

share|improve this question
up vote 6 down vote accepted

You can use who command to see where your users have logged in eg. tty, pseudo terminals, etc.

you can also use

ps -ef

from your terminal to see what all users are doing

share|improve this answer
Okay, thanks. I'll mark as solved when the time is allowed. Just a quick question: I see how I can use ps -ef and who together to know who's doing what, but when there is a ? under the TTY field, what am I to make of that? Is that the default logged in user? – TryTryAgain Mar 22 '12 at 8:01

The w command displays exactly that:

w - Show who is logged on and what they are doing.


 14:20:15 up  5:10,  4 users,  load average: 0,00, 0,04, 0,05
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
user     pts/2    :0.0             09:11    5:07m  1.02s  1.02s ssh somewhere
user     pts/3    :0.0             09:11    5:08m  2.61s  2.61s ssh somewhere
user     pts/5    :0.0             09:12    5:07m  0.41s  0.41s /usr/bin/luit -
user     pts/0    :0.0             12:35    0.00s  0.34s  0.00s w
share|improve this answer
easy, thanks. good stuff – TryTryAgain Mar 23 '12 at 1:07

You can try ps -efu user, doing man ps will list all options avaiable

share|improve this answer
ps -f U $USER

will show you the logged in user activity. You can replace the $USER with any user id or username. Please note you can't use it in conjunction with the -f option as incorrectly stated above.

share|improve this answer
The command you stated as being incorrectly stated works fine for me! – TryTryAgain Apr 29 at 18:59

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.