System Info

last

Show listing of last logged-in users from the wtmp file.

Synopsis

syntax
last [OPTION]... [USER]...

Examples

Show recent login history
last
Show last 10 logins
last -n 10
Show reboot history
last -x reboot
Show logins by alice
last alice

Common options

FlagDescription
-nShow last N logins
-aDisplay hostname in last column
-xShow shutdown/reboot entries
-FPrint full login and logout times

About last

The `last` command show listing of last logged-in users from the wtmp file. System information commands provide insight into hardware, kernel, memory, disk, and user session details.

These are typically the first tools you reach for when diagnosing system problems, capacity planning, or auditing a server's configuration. They work across most Linux distributions without additional packages.

The command accepts 4 commonly used flags shown above, though the full set of options is available in the man page (`man last`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More System Info Commands

Other commands in the System Info category

Related tools