OS Manuals

/usr/bin/last

Login utils from util-linux package newgrp last lastb login lslogins nologin sulogin

From util-linux-login 2.42.4-r2 (os), captured 2026-11-05 by running last --help (exit 0). permalink

Usage:
 last [options] [<username>...] [<tty>...]

Show a listing of last logged in users.

Options:
 -<number>            how many lines to show
 -a, --hostlast       display hostnames in the last column
 -d, --dns            translate the IP number back into a hostname
 -f, --file <file>    use a specific file instead of /var/log/wtmp
 -F, --fulltimes      print full login and logout times and dates
 -i, --ip             display IP numbers in numbers-and-dots notation
 -n, --limit <number> how many lines to show
 -p, --present <time> display who were present at the specified time
 -R, --nohostname     don't display the hostname field
 -s, --since <time>   display the lines since the specified time
 -t, --until <time>   display the lines until the specified time
 -T, --tab-separated  use tabs as delimiters
     --time-format <format>  show timestamps in the specified <format>:
                               notime|short|full|iso
 -w, --fullnames      display full user and domain names
 -x, --system         display system shutdown entries and run level changes

 -h, --help           display this help
 -V, --version        display version

For more details see last(1).
Options (17)
OptionDescriptionSource
-a, --hostlastDisplay the hostname in the last column.help + man
-d, --dnsFor non-local logins, Linux stores not only the host name of the remote host, but its IP number as well.help + man
-f, --file fileTell last to use a specific file instead of /var/log/wtmp.help + man
-F, --fulltimesPrint full login and logout times and dates.help + man
-i, --ipLike -d, but displays the host’s IP number instead of the name.help + man
-R, --nohostnameSuppresses the display of the hostname field.help + man
-s, --since timeDisplay the state of logins since the specified time.help + man
-t, --until timeDisplay the state of logins until the specified time.help + man
-T, --tab-separatedUse ASCII tab characters to separate the columns in the output instead of spaces.help + man
--time-format formatDefine the appearance of the timestamp to be one of: notime, short, full, or iso.help + man
-w, --fullnamesDisplay full user names and domain names / IP addresses.help + man
-x, --systemDisplay the system shutdown entries and run level changes.help + man
-h, --helpDisplay help text and exit.help + man
-V, --versionDisplay version and exit.help + man
-n, --limit numberThe maximum amount of logins to show. (in the manual page but not in --help)man
-numberThe same as -n number. (in the manual page but not in --help)man
-p, --present timeDisplay the users who were present at the specified time. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.