# last

## NAME



           last - list logins on the system
    


## SYNOPSIS



           **last**[ **-**_num_ | **-n** _num_ | **--lines** _num_ ]
                  [ **-f** _filename_ | **--file** _filename_ ]
                  [ _people ..._  ] [ _ttys ..._  ]
                  [ **--complain**] [ **--no-truncate-ftp-entries**]
                  [ **-x** | **--more-records**] [ **-a** | **--all-records**]
                  [ **--tw-leniency** _num_ ] [ **--tw-suspicious** _num_ ]
                  [ **-i** | **--ip-address**] [ **--debug**] [ **-w** | **--wide**]
                  [ **-s** | **--print-seconds**] [ **-y** | **--print-year**]
                  [ **-V** | **--version**] [ **-h** | **--help**]
    


## DESCRIPTION



           **last** looks  through  the  file _wtmp_ (which records all logins/lo‐
           gouts) and  prints  information  about  connect  times  of  users.
           Records are printed from most recent to least recent.  Records can
           be specified by tty and username.  tty names can be abbreviated:
                                         **last** 0
           is equivalent to
                                       **last** tty0.
    
           Multiple arguments can be specified:
                                   **last** root console
           will  print  all  of the entries for the user _root_ and all entries
           logged in on the _console_ tty.
    
           The special users _reboot_ and _shutdown_ log in when the  system  re‐
           boots or (surprise) shuts down.
                                      **last** reboot
           will produce a record of reboot times.
    
           If **last** is interrupted by a quit signal, it prints out how far its
           search in the _wtmp_ file had reached and then quits.
    


## OPTIONS



           **-n** _num,_ **--lines** _num_
                  Limit the number of lines that **last** outputs.  This is dif‐
                  ferent from u*x **last,** which lets you specify the number
                  right after a dash.
           **-f** _filename,_ **--file** _filename_
                  Read from the file _filename_ instead of the system's _wtmp_
                  file.
           **--complain**
                  When the _wtmp_ file has a problem (a time-warp, missing
                  record, or whatever), print out an appropriate error.
           **--tw-leniency** _num_
                  Set the time warp leniency to _num_ seconds.  Records in _wtmp_
                  files might be slightly out of order (most notably when two
                  logins occur within a one-second period - the second one
                  gets written first).  By default, this value is set to 60.
                  If the program notices this problem, time is not assigned
                  to users unless the **--timewarps** flag is used.
           **--tw-suspicious** _num_
                  Set the time warp suspicious value to _num_ seconds.  If two
                  records in the _wtmp_ file are farther than this number of
                  seconds apart, there is a problem with the _wtmp_ file (or
                  your machine hasn't been used in a year).  If the program
                  notices this problem, time is not assigned to users unless
                  the **--timewarps** flag is used.
           **--no-truncate-ftp-entries**
                  When printing out the information, don't chop the number
                  part off of `ftp'XXXX entries.
           **-x, --more-records**
                  Print out run level changes, shutdowns, and time changes in
                  addition to the normal records.
           **-a, --all-records**
                  Print out all records in the _wtmp_ file.
           **-i, --ip-address**
                  Some machines store the IP address of a connection in a
                  utmp record.  Enabling this option makes **last** print the IP
                  address instead of the hostname.
           **-w, --wide**
                  By default, **last** tries to print each entry within in 80
                  columns.  Use this option to instruct **last** to print out the
                  fields in the _wtmp_ file with full field widths.
           **--debug**
                  Print verbose internal information.
           **-s, --print-seconds**
                  Print seconds when displaying dates.
           **-y, --print-year**
                  Print year when displaying dates.
           **-V, --version**
                  Print **last's** version number.
           **-h, --help**
                  Prints the usage string and default locations of system
                  files to standard output and exits.
    


## FILES



           _wtmp_
                  The system wide login record file. See wtmp(5) for further
                  details.
    


* * *