Linux Last Command : Records User Logins And Last Reboots

[root@localhost ~]# last reboot
[root@localhost ~]# last reboot | head -1

To list all user id login successfully

# last

To list all user id failed login

# lastb

To list all ip address

# last -R
or
# lastb –R

How To clear last command history



#> /var/log/wtmp
Or
#> /var/log/lastlog