Yes, you read it right! w is the command to show which users are logged-on to the system and what they are doing. It shows much more information than the popular command who. Simple, isn’t it?
$ w 21:14:32 up 7:48, 3 users, load average: 0.04, 0.15, 0.16 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user1 :0 :0 13:25 ?xdm? 5:43 0.83s /usr/bin/lxsession -s LXDE -e LXDE user2 pts/0 :0 21:12 0.00s 0.03s 0.00s w root pts/1 :0 21:14 8.00s 0.03s 0.00s watch free -m
-p : show the IP address of remote users instead of hostname user : show information about 'user' only
w is available by default on Ubuntu. Do you know the only other single letter command (technically alias) that works by default on many Linux distros?
Meen more help? Run:
$ man w