If you are continuously running shell commands on more than one linux terminal, probably you want all of the shell (mostly bash) prompts to remember any command from any terminal. With the following environmental variables to save the .bashrc file, you can do it so.
# This is for ignoring duplicate entries
# This is for large history
# This is for a big history file
# This is for appending commands to history file
shopt -s histappend
# This is for saving and reloading the history after each command is run
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"