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 https://github.com/tmux-plugins/tpm ~/.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 '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)
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.