How to configure tmux/iTerm to display session name as title in terminal tab?

I added this capability by...

  1. Adding the following line to my .tmux.conf to include the following line

set-option -g set-titles on

  1. Starting my tmux session with the -s switch

tmux new-session -s session_name

I have not yet figured out how to set the title from within the session, but it should be possible. Hope that helps!

Source URLs:

Rename Iterm2 tab from within tmux

https://gist.github.com/henrik/1967800