English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux lastb Command

Linux Command大全

The Linux lastb command is used to list the relevant information of users who failed to log in to the system.

If the lastb command is executed alone, it will read the location/var/Under the log directory, the file named btmp, and the content of the file

Record the list of failed login users, displaying all.

Syntax

lastb [-adRx][-f <Record File>][-n <Display Columns>][Account Name...][Terminal Number...]

Parameter Description

  • -a  Display the hostname or IP address from which the system was logged in on the last line.
  • -d  Convert IP addresses to hostnames.
  • -f<Record File>  Specify the record file.
  • -n<Display Columns> or-<Display Columns>  Set the number of columns displayed in the list.
  • -R  Do not display the hostname or IP address of the host logging into the system.
  • -x  Display information about system shutdown, reboot, and execution level changes.

Online Examples

Display failed login users

# lastb 
root   tty7     :1        Thu May 13 11:26 - 11:26 (00:00)  
btmp begins Thu May 13 11:26:39 2014

Linux Command大全