Find the Last Logged-In Users on Linux with Lastlog Command
The lastlog command in Linux shows the most recent login of all the users or a specific user by pulling the information from the “/var/log/lastlog” file. The output is a long format summary of all the user’s account names, ports, IP addresses, and last login