Prevent a Command from Being Added to the History

Edit the ~/.bashrc file, and add to it:

export HISTCONTROL=ignorespace

All commands beginning with a space character will not be added to the history.


This is archived version of blog, preventing broken links. This version will stay online indefinitely.