Replicate history commands in multiple terminal

Hi,

I am using putty client to connect to my remote Linux server box, and I am connecting through ssh. That system runs bash shell. So, if I use multiple putty terminal, how can I replicate those commands that I ran in other terminals to be available/shared in the current terminal window (i.e) to sync those history commands in all the terminals I use. Is there any command available to establish this? I could not see those commands in the output of history or cat ~/.bash_history?

Thanks

You could use something like this:

cat <<! >> "$HOME"/.bashrc
shopt -s histappend
PROMPT_COMMAND='history -n; history -a'
!

You'll need to press ENTER to re-sync the history when you pass from one terminal to another.

For more details check this.