Shell History

Temporarily disable shell history

Temporarily disable shell history

Works for bash and Zsh.

In a new shell session:

unset HISTFILE

Reference

https://unix.stackexchange.com/questions/692913/temporarily-disable-history-in-zsh

https://unix.stackexchange.com/questions/10922/temporarily-suspend-bash-history-on-a-given-shell

Code licensed under the MIT License; all other content under CC BY-SA 4.0.
Last updated on Sep 08, 2026 18:35 UTC
Built with Hugo
Theme Stack designed by Jimmy