Q: How to clear bash history?

Bash History Security

Answer:

Bash history is recorded in the ~/.bash_historyfile. We can clear this file using the command > ~/.bash_history However bash also holds a copy of history in memory. We can clear bash history completely by running the following command:

> ~/.bash_history && history -cw

Answered by
Double

Last updated on
Aug 14, 2016

Share