Last will look in the wtmp file which records all logins and logouts for information about a user, a terminal or any group of users and terminals.
Arguments specify names of users or terminals of interest.
Names of terminals may be given fully or abbreviated. If multiple arguments are given, the information which applies to any of the arguments is printed. Last will print the sessions of the specified users and terminals, most recent first, indicating the times at which the session began, the duration of the session, and the terminal which the session took place on. Last indicates if the session is still continuing or was cut short by a reboot. Last with no arguments prints a record of all logins and logouts, in reverse order.