Tuesday, May 7, 2013

Find currently logged users on a linux system

With the who command you can list the current logged users on a linux system:

# who

user     tty7         2013-05-07 09:18 (:0)
roy     pts/0        2013-05-07 14:47 (:0.0)
tony     pts/1        2013-05-07 14:49 (:0.0)
ana     pts/2        2013-05-07 15:18 (:0.0)

If the list is too long, and you want to search for a specific user, you can use grep:

# who | grep ana

ana     pts/2        2013-05-07 15:18 (:0.0)

No comments:

Post a Comment