install tmux
apt install tmux
and tmux plugin managergit clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
edit or create
.tmux.conf
vi .tmux.conf
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @continuum-restore 'on'
# for vim
set -g @resurrect-strategy-vim 'session'
# for neovim
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-save-shell-history 'on'
set -g @resurrect-capture-pane-contents 'on'
run '~/.tmux/plugins/tpm/tpm'
3.initialize
prefix shift-i
refer to https://liam0205.me/2016/09/10/tmux-plugin-resurrect/ for more
For centos install with tmux source, and refer to this