tail head cat sleep
QR code linking to this page

Manual Pages  — LASTLOGIN


lastlogin – indicate last login time of users



lastlogin [-f file] [-rt] [user ...]


The lastlogin utility will list the last login session of each specified user, or for all users by default. Each line of output contains the user name, the tty from which the session was conducted, any hostname, and the start time for the session.

If more than one user is given, the session information for each user is printed in the order given on the command line. Otherwise, information for all users is printed. By default, the entries are sorted by user name.

The lastlogin utility differs from last(1) in that it only prints information regarding the very last login session. The last login database is never turned over or deleted in standard usage.

The following options are available:
-f file
  Open last login database file instead of the system-wide database.
  Print the entries in reverse sorted order.
  Sort the elements by last login time, instead of user name.


  last login database


last(1), getutxent(3), ac(8)


John M. Vinopal wrote this program in January 1996 and contributed it to the NetBSD project.

LASTLOGIN (8) June 6, 2011

tail head cat sleep
QR code linking to this page

Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

A typical Unix /bin or /usr/bin directory contains a hundred different kinds of programs, written by dozens of egotistical programmers, each with its own syntax, operating paradigm, rules of use ... strategies for specifying options, and different sets of constraints.
— The Unix Haters' handbook