Erasing Bash History

To erase the bash history,

On the console screen:

history

when you run the command you see above, it wil show you all of the operations you have ever performed. Bash history shown on that screen will be the one you perform on whichever user you were on. Simply, you can delete erase this history with the

history -c

command. But in this way, all of the previous history will be back where it was after closing and opening the terminal. To get a permanent result

cat /dev/null > ~/.bash_history && history -c && exit

command can be used. With this, you can send the user’s bash history to eternity.

Leave a Reply

Your email address will not be published. Required fields are marked *