lastb
securityLinux/Unix
The lastb command is one of the most frequently used commands in Linux/Unix-like operating systems. lastb Show listing of last bad login attempts
Quick Reference
Command Name:
lastb
Category:
security
Platform:
Linux/Unix
Basic Usage:
lastb [options] [arguments]
Common Use Cases
Syntax
lastb [options] [username...] [tty...]
Options
Option | Description |
---|---|
-a, --hostlast |
Display hostname in the last column |
-d, --dns |
Translate IP addresses to hostnames |
-f, --file file |
Use specified file instead of /var/log/btmp |
-F, --fulltimes |
Print full login and logout times and dates |
-i, --ip |
Display IP addresses instead of hostnames |
-n, --limit N |
Show only the last N entries |
-R, --nohostname |
Don't display the hostname field |
-s, --since time |
Display entries since the specified time |
-t, --until time |
Display entries until the specified time |
-w, --fullnames |
Display full user and domain names |
--time-format format |
Show timestamps in the specified format |
-h, --help |
Display help message |
-V, --version |
Display version information |
Examples
How to Use These Examples
The examples below show common ways to use the lastb
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
lastb