The lastlog command is used to display information about the most recent logins of users on the system. This command actually reads data from the file "/var/log/lastlog," which contains user login information such as usernames, terminals, hosts, and the times of the last login.
The basic syntax of the lastlog command is: lastlog [OPTIONS]
Common options for the lastlog command are as follows:
$ lastlog -t 3 ←Display information about users' last logins within the last 3 days Username Port From Latest root tty2 Thu Jun 13 05:20:40 -0400 2016 gdm :0 Thu Jun 13 05:20:23 -0400 2016 maori :0 Thu Jun 13 05:21:03 -0400 2016 jacky tty3 Thu Jun 13 05:20:50 -0400 2016 |