Bash – Start bash session without history

bashcommand history

There are several options to disable saving commands to bash history e.g.

set +o history

or

unset HISTFILE

How to start a new bash session with history disabled?

I tried bash +o history but it didn't work.

EDIT: I don't want to modify my rc or profile files. I just want to start a single bash session with a different configuration.

Best Answer

bash --init-file <(echo '. ~/.bashrc; unset HISTFILE')

OR

bash --rcfile <(echo '. ~/.bashrc; unset HISTFILE')

And better put it in ~/.bash_aliases as permanent alias:

alias bash2="bash --init-file <(echo '. ~/.bashrc; unset HISTFILE')"