Name
last — stdin stdout - file -- opt --help --version
Synopsis
last [options] [users] [ttys]
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/wtmp; see the |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access