1 2 3 4 5 6 7 | # avoid duplicates.. export HISTCONTROL=ignoredups:erasedups # append history entries.. shopt -s histappend # After each command, save and reload history export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r" |