Installing tmux-resurrect
Following the instructions on the GitHub page, clone the repo to some location (e.g. I like to use ~/build/tmux-resurrect/) with:
git clone
https://github.com/tmux-plugins/tmux-resurrect ~/build/tmux-resurrect/
Then, place the following line at the end of the ~/.tmux.conf file:
run-shell ~/build/tmux-resurrect/resurrect.tmux
Finally, in order to have the pane contents restored, add the following line to the ~/.tmux.conf file:
set -g @resurrect-capture-pane-contents 'on'
See this post for more details on this last step.
That's it! It is ready to use.