Restoring TMUX sessions after a system reboot

Published: Updated:
2 min read 260 words
Banner

Losing your tmux sessions after a reboot can be a huge productivity killer. Fortunately, tmux-resurrect lets you save and restore your sessions—including windows, panes, and even running programs. And for seamless automation, it pairs perfectly with tmux-continuum, which saves and restores sessions automatically in the background.

Let’s set it up.

Prerequisites

Make sure you have the Tmux Plugin Manager (TPM) installed. If not, follow this guide to install it first.

Install tmux-resurrect and tmux-continuum

Add both plugins to your .tmux.conf:

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

Then reload your tmux config and install the plugins:

# Reload tmux config
tmux source-file ~/.tmux.conf

# Use TPM to install plugins (press prefix + I)

💡 prefix is usually Ctrl+b (or Ctrl+a if customized).

Enable Autosave and Autorestore

Configure tmux-continuum to automatically save and restore your sessions:

# Enable automatic saving every 15 minutes
set -g @continuum-save-interval '15'

# Enable auto-restore when tmux starts
set -g @continuum-restore 'on'

No need to configure tmux-resurrect directly—tmux-continuum uses it behind the scenes.

Manual Save and Restore (Optional)

If not using automatic restore you can save or restore sessions manually:

  • Save: prefix + Ctrl-s
  • Restore: prefix + Ctrl-r

Saved session files are stored in ~/.tmux/resurrect/.

That’s It!

With tmux-resurrect and tmux-continuum, your sessions are saved automatically in the background—and restored every time you start tmux. No more lost work, no more setup rituals.

This combo is one of the easiest ways to make tmux feel like a true persistent workspace.

Further reading
previous
Remap Caps Lock to ESC
Remap Caps Lock to ESC
next
Simplify Your Dotfile Management with GNU Stow
Simplify Your Dotfile Management with GNU Stow