Skip to content

Who Are Still Logged in? and Where Are They From?

There are several ways to know who are still logged in and where (IP Address) they come from on your Linux server.
  1. Command "w"
  2. [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      05:52    0.00s  0.01s  0.00s w

  3. Command "who"
  4. [root@test ~]# who
    steven   tty1         2014-05-04 05:56
    root     pts/0        2014-05-04 05:52 (

  5. Command "last"
  6. [root@test ~]# last | grep "still logged in"
    steven   tty1                          Sun May  4 05:56   still logged in
    root     pts/0      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

Leave a Reply

Your email address will not be published. Required fields are marked *