Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

On Linux (Fedora 14), the "w" command says this:

 23:51:32 up 13 min,  7 users,  load average: 0,22, 0,42, 0,34
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
USERNAME        tty1     :0               23:39   12:49  30.71s  0.08s pam: gdm-password
USERNAME        pts/1    :0.0             23:39    9:39   0.01s  0.01s bash
USERNAME        pts/0    :0.0             23:51    0.00s  0.02s  0.00s w

Why are there 7 logged in users when it only lists 3?

share|improve this question
Duh! I didn't even know about w, shame on me! – phunehehe Dec 27 '11 at 12:06
This also applies to Ubuntu. – Philip Dec 27 '11 at 12:36
Weird. Doesn't happen on RHEL 5.4 on a few boxes I looked at (including one rather busy and one completely idle server). – Mat Dec 27 '11 at 16:46
What does last|grep 'still logged in' say? – Patrick Dec 27 '11 at 19:09
Maybe you need to run it as root ? – Dom Dec 27 '11 at 19:54

This answer to User logged in by sftp does not show up in `w` suggests that w uses utmp logging - some digging shows that utmp is a file in /var/run/utmp.

If a program hasn't cleaned up utmp after logging to it, I suspect w may produce output like what you ran into.

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.