Artificial intelligent assistant

How do I close a terminal without saving the history? More than once I've accidentally run a number of commands and polluted my bash history. How do I close my terminal without saving my bash history? I'm using Fedora.

Your shell's history is saved in the file indicated by the `HISTFILE` variable. So:


unset HISTFILE


This also applies to zsh, but not to ksh which keeps saving to the file indicated by `$HISTFILE` when the shell starts (and conversely, you decide to save your history in ksh once you've started the shell).

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 28bd8b272ddef4c60402002dfb1ac438