Operating System - Linux
1827294 Members
2161 Online
109717 Solutions
New Discussion

Re: how many users are online at a particular time ?

 
khilari
Regular Advisor

how many users are online at a particular time ?

Hi guys, i used uptime to get the info of how many users are online at a particular time, but it doesnt really give me an accurate answer. It only shows 2 users only root. I asked someone to login and even after him logging the uptime showed 2 users??. Is there any other command i can use to know how many users are online at a particular time?. Thanks alot
4 REPLIES 4
Tony Berry
Valued Contributor

Re: how many users are online at a particular time ?

'who' will give you this information. Pipe it through 'wc' to get a count... 'who | wc -l'.

Let me know if that works for you.
Unix is boss.
skt_skt
Honored Contributor

Re: how many users are online at a particular time ?

who or w should help here
Ivan Krastev
Honored Contributor

Re: how many users are online at a particular time ?

Another useful command is 'users'. It prints usernames of curently logged in users.

regards,
ivan
James R. Ferguson
Acclaimed Contributor

Re: how many users are online at a particular time ?

Hi:

You can also use:

# uptime

Regards!

...JRF...