12

Tip #814   Quit bash without saving history

If you're working in bash and want to quit without saving your history, you can do so using:

kill -9 $$

$$ gives the pid of the current bash instance, and the kill ends the process. There are other ways of disabling history in bash, but this can be used with no forward planning and any time/place you like.