Name
last [options
] [users
] [ttys
] — SysVinit
Synopsis
/usr/bin
stdin stdout - file -- opt --help --version
The last
command displays a history of logins, in reverse chronological order.
$ last barrett pts/3 localhost Mon Sep 8 21:07 - 21:08 (00:01) smith pts/6 :0 Mon Sep 8 20:25 - 20:56 (00:31) barrett pts/4 myhost Sun Sep 7 22:19 still logged in ...
You may provide usernames or tty names to limit the output.
Useful options | |
| Print only the latest |
| Display IP addresses instead of hostnames. |
| Don’t display hostnames. |
| Also display system shutdowns and changes in system runlevel (e.g., from single-user mode into multiuser mode). |
| Read from some other data file than /var/run/utmp; see the |
Get Linux Pocket Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.