Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Name

last

Synopsis

last [options] [username] [ttynumber]

Display a list of the most recent logins, taken from the file /var/log/wtmp by default. If you specify a tty number or username, the output displays only the logins for that user or terminal.

Options

-a

Display the hostname from which logins originated in the last column.

-d

For remote logins, display both IP address and hostname.

-f filename

Get the list of logins from filename. The default source is /var/log/wtmp.

-i

Like -d, but display the IP address in numbers-and-dots notation.

-n number, -number

Choose how many lines of logins to display. Thus, last −7 or last -n 7 displays seven lines.

-R

Do not show the hostname.

-x

Display shutdown messages and runlevel messages.

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.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page