Security: Linux History command

History command can be useful for you to refer to, you can type history in your terminal and you will see the commands you had executed.

root@bt:~# history
  956  history
  957  which .bash_history
  958  locate .bash_history
  959  nano .bash_history 
  960  clear
  961  history
root@bt:~#

Suppose you want to execute history number 960:

You do !960.

Clear history:

root@bt:~# history -c
root@bt:~# rm .bash_history

You may have cleared your history with history -c command, but in .bash_history still contains your history up to your first command, you can choose to remove this file if you want.

The implication for history command is that you allow footprinting by a hacker to understand your linux ability through studying the commands you have executed, history command will also review some files or directories you have referred to, and also some configuration you had attempted to execute before.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s