Where Does tmux-resurrect Store Sessions?
tmux-resurrect snapshots sessions to ~/.tmux/resurrect, restoring them with prefix Ctrl-r after a reboot.
Last updated
tmux-resurrect turns a reboot from a disaster into a keystroke. Saving writes one timestamped text file per snapshot into ~/.tmux/resurrect and swings a symlink called last to the newest. Restoring replays sessions, windows, panes, layouts, working directories, and opted in programs from that file.
The last symlink is also the recovery story. A failed save can leave a zero byte file behind, and pointing last back at the previous good snapshot fixes restores without losing history. Pane contents need the capture option enabled to come along at all.
Where Tmux Resurrect stores this, by platform
~/.tmux/resurrect
Timestamped snapshots plus the last symlink restore reads. Set the resurrect dir option to relocate. Corrupt saves show as zero byte files.
~/.tmux/resurrect
Same layout as Linux. The plugin ships with tpm under ~/.tmux/plugins, and save restore keys work identically on both systems.
Frequently asked questions
How do I save and restore my tmux layout?
Press prefix Ctrl-s in tmux. The plugin writes a timestamped file and moves the last symlink to it. Restore later with prefix Ctrl-r.
How do I move the resurrect directory?
Point the resurrect dir option at the new path in tmux.conf. Tilde and hostname variables expand, which suits shared dotfiles across machines.
Restored panes open empty shells. Why?
Only the listed programs relaunch by default. Add names through the processes option in tmux.conf, and check the last file for exact command strings.
Notice an outdated path? Let us know.