Tuesday, May 08, 2007

List Logged In Users on System

Here are four handy commands to ascertain who is logged onto a local system. The first one is the who command, which provides a list of users. The second one is the who am i command. It shows the current user. The third one is the w command. It shows information about currently logged-in users. The last command is the finger command, and it displays user information.

The who command
#who

The who am i command
#who am i
esofthub

The w command
#w
From a commenter's post.
root@mars# w
1:44pm up 4:29, 1 user, load average: 0.05, 0.05, 0.05
User tty login@ idle JCPU PCPU what
root pts/1 9:24am 1:56 w

The finger command
#finger esofthub

Other notable commands to ascertain logged in users on the network (rwho and rusers can bog large networks down due to broadcasts)

The rwho command
#rwho

The rusers command
#rusers

2 comments:

Anonymous said...

And what about w ?

root@mars# w
1:44pm up 4:29, 1 user, load average: 0.05, 0.05, 0.05
User tty login@ idle JCPU PCPU what
root pts/1 9:24am 1:56 w

esofthub said...

Good point anonymous