How to delete terminal history in Linux – MSGOR
Home » How to delete terminal history in Linux

How to delete terminal history in Linux

by Admin

You can clear your bash history like this:

#cat /dev/null > ~/.bash_history && history -c && exit    or
#cat /dev/null > ~/.bash_history erases the content of the ~/.bash_history file.

history -c clears the current terminal history.

You may also like

1 comment

Alexandr September 8, 2021 - 7:52 pm

Thank you for this article

Leave a Comment