There are several ways to know who are still logged in and where (IP Address) they come from on your Linux server.
- Command "w"
[root@test ~]# w
06:01:53 ...
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
steven tty1 - 05:56 5:07 0.00s 0.00s -bash
root pts/0 192.168.5.3 05:52 0.00s 0.01s 0.00s w
- Command "who"
[root@test ~]# who
steven tty1 2014-05-04 05:56
root pts/0 2014-05-04 05:52 (192.168.5.3)
- Command "last"
[root@test ~]# last | grep "still logged in"
steven tty1 Sun May 4 05:56 still logged in
root pts/0 192.168.5.3 Sun May 4 05:52 still logged in
In the above example, you can see there is one user from local console and the other is from a remote server (IP Address 192.168.5.3).