In Linux, there’s a
last command that lists successful login/logout history with user-name, date, ip, and so forth. There’s also a
lastb command that shows failed login attempts information.
The successful login/logout history was stored in “/var/log/wtmp“, and the failed login attempts were stored in /var/log/btmp“. To clear the login history, just clear the two directories.
Open a command console (Applications -> Accessories -> Terminal), and run this command to get root privilege:
echo to clear the directories:
echo > /var/log/btmp
To clear command history, just run
history command with
-c parameter. Or clear ./.bash_history
echo > ./.bash_history