• Health tips to prevent the spread of COVID-19:
    • Wash your hands frequently;
    • Maintain 2 meters social distancing;
    • Minimise outdoor activities.
    Stay safe in your bubble!

How to clear bash history without leaving any trace

Andy

Administrator
User ID
1
Joined
7 Jan 2019
Messages
175
Reaction score
7
Points
18
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
This will 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:
Top