previous contents up next

Unix for Advanced Users

7. Viewing System Information

7.3.3 Who's been logging into the system? last

The last command prints a recent history of logins. Listed for each login are: user name, tty, origin, date and time of login, time of logout, and the amount of time that the user spent logged in. Users that are currently signed on are identified. The history runs back to the last time that the login-history database was archived.

Here is sample output from last.

barjtell  pts/4        stash.mondo.edu  Mon Jun 21 14:47 - 15:02  (00:15)
ashensky  pts/4        riboflavin.org   Mon Jun 21 14:42 - 14:44  (00:01)
ashensky  pts/4        riboflavin.org   Mon Jun 21 14:16 - 14:36  (00:19)
library   pts/2        stacks.lib.campu Mon Jun 21 14:15   still logged in
shrims    pts/2        stucko.palace.or Mon Jun 21 14:09 - 14:11  (00:02)
library   pts/4        stacks.lib.campu Mon Jun 21 13:23 - 14:08  (00:45)
ralphsky  pts/5        microlab.huhall. Mon Jun 21 13:02   still logged in
snutch    pts/4        bioc.cu.kalamzoo Mon Jun 21 12:52 - 13:20  (00:27)

wtmp begins Sun Jun 20 03:31

No one here starts work before noon.

previous contents up next