How to clear bash history without leaving any trace

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
1,192
Reaction score
59
Points
48
In some occasion, if you don't want to leave any trace on what you've done on your Linux bash console or terminal or SSH client, use the following command:
Bash:
history -c && history -w && exit
The command above clears any history, writes an empty value of history (since it was cleared) and exits the terminal 🤓
Let me know down below if you find this article useful, or perhaps you have a better idea of doing this 👍
 
 Short URL:
Back
Top