previous contents up next

Unix for Advanced Users

5. Navigating effectively

5.7. When did I log in last? last

Sometimes it is useful to get a sense of history. If you suspect that someone has broken into your account, you may want to see when the account was last used; if you see a login at midnight and you know you did not use the machine after 7:00, you can conclude you have been cracked.

lastlog prints records for several logins. It can also print the information about another user, taking the username as its first argument. lastlog root is useful when you want to check on the integrity of the root account without logging in to it.

previous contents up next