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
| Flag | Description |
|---|---|
| -n | Show last N logins |
| -a | Display hostname in last column |
| -x | Show shutdown/reboot entries |
| -F | Print 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