Monitor Users
Few(among many) commands to monitor users are,
-
who
- tells us the name of the users who are currently logged in the system.
-
last
- gives us a list of all the users who have previously(or currently) logged in the system.
- useful for sysadmins who need to track user activity on a server.
last | awk '{print $1}' | sort | uniq
will give all the usernames who have logged in previously.
-
w
- It is same as who but with more information like load usage, running session etc.
-
finger
orpinky
- doesn't come preinstalled.
- gives details of all the users logged in.
- provides details like login name, user name, idle time, login time, and in some cases their email address
-
id
- used to confirm the identity of a specified Linux user.
- to find user and group names, along with the UID and GID of any user in Linux