List User Login Details


Needing to view current activity of users on the system.



Most flavours of UNIX provide a number of tools, to tell you who is logged in or when they last accessed the system.



A favorite of mine, is who -Hu – really good for seeing who is idle, quite literally! 🙂

Also you can just run last – although beware of rolled logs. Generally in /var/adm/wtmp* on Solaris and /var/log/wtmp* on Linux.

If you want to run last against an older file (by default it just uses wtmpx or wtmp) – just specify minus f – like this: last -f /var/log/wtmp.1

Additionally the finger command will quite often show last login time.



[tags]who, last, finger, Unix Coding School[/tags]


If you have found my website useful, please consider buying me a coffee below 😉

Leave a Reply

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