This post aims to describe some useful bash history settings, that are all too often unknown of. Following are some environment variables described, which can be set in the users bashrc file in eg. ~/.bashrc. HISTCONTROL Setting Behaviour ignorespace Do not record if line starts with a blank/space ignoredups Do not record line if its a duplicate of the previous line ignoreboth Do ignorespace and ignoredups erasedups Do remove all occurences of line before saving line The settings can be combined by colons, eg.