The world's smallest Bash tip

This is likely the briefest useful tip I’ll ever give. Sometimes you don’t want sensitive information, like a password, to be included in the history of your bash terminal. You don’t have to go to your .bash_history file and remove it afterwards - instead you can just:

Start the line with a space

For instance:

mpjdem@mpjdem:~$  echo $HISTCONTROL

Press the up arrow to test and the above line shouldn’t show up in your history. If it does, likely the HISTCONTROL environment variable was not set to either ignoreboth (default) or ignorespace. Change this in your .bashrc if that’s the case.