The history of the shell has little to do with tmux; it is related to the shell used. Therefore, if you decide to use zsh, iirc is enabled by default. With bash, you need to add some magic to your .bashrc
export PROMPT_COMMAND="history -a; history -n"
this adds your last command to the story and reloads your story after each command. See this post for more information.
three source share