Restore tmux session and layout

save and restore tmux session and window layout after systems restarts

You can use tmux plugins

  • tmux-resurrect
  • tmux-continuum

tmux-continuum is the newer plugin by the author of tmux-resurrect

Install Tmux Plugin Manager (tpm)

git clone ~/.tmux/plugins/tpm
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'

set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin ''
# set -g @plugin ''

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
# Reload TMUX environment so TPM is sourced
tmux source ~/.tmux.conf

Hit prefix + I to fetch the plugin and source it. The plugin will automatically start "working" in the background, no action required.


Please note that this site and the posts on it are, and will always be, a work in progress. If i waited for perfection, i’d never get anything done.