<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Development-Tools on Daniel Zhang</title><link>https://zhangdapeng.dev/tags/development-tools/</link><description>Recent content in Development-Tools on Daniel Zhang</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 11 Nov 2026 14:30:00 +0800</lastBuildDate><atom:link href="https://zhangdapeng.dev/tags/development-tools/index.xml" rel="self" type="application/rss+xml"/><item><title>Persist and Restore Tmux Sessions with Tmux-Resurrect and TPM</title><link>https://zhangdapeng.dev/p/tmux-resurrect-tpm-session-restore/</link><pubDate>Wed, 11 Nov 2026 14:30:00 +0800</pubDate><guid>https://zhangdapeng.dev/p/tmux-resurrect-tpm-session-restore/</guid><description>&lt;img src="https://zhangdapeng.dev/p/tmux-resurrect-tpm-session-restore/cover.png" alt="Featured image of post Persist and Restore Tmux Sessions with Tmux-Resurrect and TPM" /&gt;&lt;p&gt;Tmux is an essential tool for developers who frequently work in terminal environments. It allows you to organize multiple tasks into separate sessions, windows, and panes without opening multiple terminal applications.&lt;/p&gt;
&lt;p&gt;However, Tmux does not persist session state to disk by default. If your server restarts, the Tmux server crashes, or you accidentally run &lt;code&gt;tmux kill-server&lt;/code&gt;, your existing sessions, window layouts, and working directories may be lost.&lt;/p&gt;
&lt;p&gt;Recreating all those sessions and manually arranging panes every time you restart your environment can quickly become frustrating.&lt;/p&gt;
&lt;p&gt;Fortunately, you can solve this problem with &lt;strong&gt;Tmux Plugin Manager (TPM)&lt;/strong&gt; and the &lt;code&gt;tmux-resurrect&lt;/code&gt; plugin. By combining it with &lt;code&gt;tmux-continuum&lt;/code&gt;, you can also enable automatic session saving and restoration.&lt;/p&gt;
&lt;p&gt;This guide walks through the installation, configuration, verification, and troubleshooting process.&lt;/p&gt;
&lt;h2 id="1-understanding-tmux-resurrect-and-tmux-continuum"&gt;1. Understanding Tmux-Resurrect and Tmux-Continuum
&lt;/h2&gt;&lt;p&gt;Before configuring anything, it is important to understand the roles of these two plugins.&lt;/p&gt;
&lt;h3 id="11-tmux-resurrect-manual-session-saving-and-restoration"&gt;1.1 tmux-resurrect: Manual Session Saving and Restoration
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://github.com/tmux-plugins/tmux-resurrect" target="_blank" rel="noopener"
 &gt;tmux-resurrect&lt;/a&gt; is a plugin that persists your Tmux environment across restarts.&lt;/p&gt;
&lt;p&gt;It can save and restore information such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All Tmux sessions, windows, and panes.&lt;/li&gt;
&lt;li&gt;Window and pane ordering.&lt;/li&gt;
&lt;li&gt;The current working directory (CWD) of each pane.&lt;/li&gt;
&lt;li&gt;Pane layouts, including zoomed layouts.&lt;/li&gt;
&lt;li&gt;The currently active session, window, and pane.&lt;/li&gt;
&lt;li&gt;Selected running programs.&lt;/li&gt;
&lt;li&gt;Optional Vim/Neovim sessions and pane history contents.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It provides two default keybindings:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Keybinding&lt;/th&gt;
					&lt;th&gt;Action&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;Prefix + Ctrl-s&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Save the current Tmux environment&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;Prefix + Ctrl-r&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Restore the previously saved environment&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The default Tmux prefix key is &lt;code&gt;Ctrl + b&lt;/code&gt;. If you have customized it, use your configured prefix instead.&lt;/p&gt;
&lt;h3 id="12-tmux-continuum-automatic-saving-and-restoration"&gt;1.2 tmux-continuum: Automatic Saving and Restoration
&lt;/h3&gt;&lt;p&gt;&lt;a class="link" href="https://github.com/tmux-plugins/tmux-continuum" target="_blank" rel="noopener"
 &gt;tmux-continuum&lt;/a&gt; builds on top of &lt;code&gt;tmux-resurrect&lt;/code&gt; to automate session persistence.&lt;/p&gt;
&lt;p&gt;Its main features include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Automatic saving:&lt;/strong&gt; Saves the Tmux environment every 15 minutes by default.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic restoration:&lt;/strong&gt; Restores the most recently saved environment when the Tmux server starts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The relationship between these plugins is straightforward:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tmux-resurrect&lt;/code&gt; handles saving and restoring sessions.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tmux-continuum&lt;/code&gt; automates periodic saves and restoration when the Tmux server starts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you only need manual session recovery, &lt;code&gt;tmux-resurrect&lt;/code&gt; is sufficient. If you want your sessions to return automatically after a server restart, installing both plugins is recommended.&lt;/p&gt;
&lt;h2 id="2-troubleshooting-why-are-the-restore-keybindings-not-working"&gt;2. Troubleshooting: Why Are the Restore Keybindings Not Working?
&lt;/h2&gt;&lt;p&gt;A common mistake is adding the following line directly to &lt;code&gt;~/.tmux.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;set -g @plugin &amp;#39;tmux-plugins/tmux-resurrect&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then pressing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + b
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + r
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But nothing happens.&lt;/p&gt;
&lt;p&gt;In most cases, the problem is that &lt;strong&gt;TPM has not been installed, initialized, or used to install the actual plugin&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The following configuration:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;set -g @plugin &amp;#39;tmux-plugins/tmux-resurrect&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;only declares which plugin TPM should manage. It does not download or load the plugin by itself.&lt;/p&gt;
&lt;p&gt;TPM must first be cloned to your local machine and initialized through your Tmux configuration. You must then explicitly install the declared plugins.&lt;/p&gt;
&lt;p&gt;The complete process is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install TPM.&lt;/li&gt;
&lt;li&gt;Declare the plugins in &lt;code&gt;~/.tmux.conf&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Initialize TPM.&lt;/li&gt;
&lt;li&gt;Use TPM to install the plugins.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let&amp;rsquo;s go through each step.&lt;/p&gt;
&lt;h2 id="3-installing-tpm-and-configuring-the-plugins"&gt;3. Installing TPM and Configuring the Plugins
&lt;/h2&gt;&lt;h3 id="31-install-tmux-plugin-manager"&gt;3.1 Install Tmux Plugin Manager
&lt;/h3&gt;&lt;p&gt;First, make sure Git and Tmux are installed.&lt;/p&gt;
&lt;p&gt;Check their versions:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux -V
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git --version
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, clone TPM into its default plugin directory:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone https://github.com/tmux-plugins/tpm.git ~/.tmux/plugins/tpm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After cloning, verify that the directory exists:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ls -la ~/.tmux/plugins/tpm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you can see the TPM files, the installation was successful.&lt;/p&gt;
&lt;h3 id="32-configure-tmuxconf"&gt;3.2 Configure ~/.tmux.conf
&lt;/h3&gt;&lt;p&gt;Open your Tmux configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;vim ~/.tmux.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the file does not exist, you can create it.&lt;/p&gt;
&lt;p&gt;Add the following configuration:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-tmux" data-lang="tmux"&gt;# ==========================================
# TPM Plugin Manager
# ==========================================

# Plugin declarations
set -g @plugin &amp;#39;tmux-plugins/tpm&amp;#39;
set -g @plugin &amp;#39;tmux-plugins/tmux-resurrect&amp;#39;
set -g @plugin &amp;#39;tmux-plugins/tmux-continuum&amp;#39;

# ==========================================
# Tmux Resurrect
# ==========================================

# Restore pane contents (optional)
set -g @resurrect-capture-pane-contents &amp;#39;on&amp;#39;

# ==========================================
# Tmux Continuum
# ==========================================

# Enable automatic restoration
set -g @continuum-restore &amp;#39;on&amp;#39;

# Save the environment every 15 minutes (default)
set -g @continuum-save-interval &amp;#39;15&amp;#39;

# ==========================================
# Initialize TPM
# Keep this line at the very bottom!
# ==========================================

run &amp;#39;~/.tmux/plugins/tpm/tpm&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Configuration details:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;@plugin&lt;/code&gt;: Declares the plugins managed by TPM.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@resurrect-capture-pane-contents&lt;/code&gt;: Enables saving and restoring pane history contents.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@continuum-restore&lt;/code&gt;: Enables automatic restoration when the Tmux server starts.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@continuum-save-interval&lt;/code&gt;: Sets the automatic save interval in minutes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;run '~/.tmux/plugins/tpm/tpm'&lt;/code&gt;: Initializes TPM.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Keep the TPM initialization command at the very bottom of &lt;code&gt;~/.tmux.conf&lt;/code&gt;. This ensures that plugin declarations and configuration options are processed before TPM initializes.&lt;/p&gt;
&lt;h3 id="33-reload-the-tmux-configuration"&gt;3.3 Reload the Tmux Configuration
&lt;/h3&gt;&lt;p&gt;After saving the configuration file, switch to an active Tmux session.&lt;/p&gt;
&lt;p&gt;Press:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + b
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This opens the Tmux command prompt.&lt;/p&gt;
&lt;p&gt;Enter:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;source-file ~/.tmux.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Alternatively, you can execute the following command from a regular terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux source-file ~/.tmux.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;TPM will now read the plugin declarations, but the plugins have not necessarily been downloaded or installed yet.&lt;/p&gt;
&lt;h3 id="34-install-the-plugins-using-tpm"&gt;3.4 Install the Plugins Using TPM
&lt;/h3&gt;&lt;p&gt;This is the most important step.&lt;/p&gt;
&lt;p&gt;Inside your Tmux session, press:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + b
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Shift + i
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The key combination uses an uppercase &lt;code&gt;I&lt;/code&gt;, not a lowercase &lt;code&gt;i&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;TPM will download and load the plugins declared in your configuration file.&lt;/p&gt;
&lt;p&gt;Wait until the status message appears:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Plugin(s) installed!
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Both &lt;code&gt;tmux-resurrect&lt;/code&gt; and &lt;code&gt;tmux-continuum&lt;/code&gt; should now be installed and ready to use.&lt;/p&gt;
&lt;h2 id="4-verifying-session-saving-and-restoration"&gt;4. Verifying Session Saving and Restoration
&lt;/h2&gt;&lt;p&gt;After installation, it is a good idea to test manual saving and restoration before checking automatic recovery.&lt;/p&gt;
&lt;h3 id="41-save-the-current-tmux-environment"&gt;4.1 Save the Current Tmux Environment
&lt;/h3&gt;&lt;p&gt;Inside Tmux, press:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + b
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + s
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the plugin is working correctly, you should see:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Tmux environment saved!
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;By default, session data is stored in:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;~/.tmux/resurrect/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can inspect the saved files with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ls -lah ~/.tmux/resurrect/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You should normally see a &lt;code&gt;last&lt;/code&gt; state file along with timestamped backup files.&lt;/p&gt;
&lt;h3 id="42-restore-a-saved-session-manually"&gt;4.2 Restore a Saved Session Manually
&lt;/h3&gt;&lt;p&gt;After restarting Tmux, press:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + b
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + r
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If restoration starts successfully, you should see:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Restoring tmux environment...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After a short wait, your previously saved sessions, windows, pane layouts, and working directories should reappear.&lt;/p&gt;
&lt;h3 id="43-test-recovery-after-restarting-the-tmux-server"&gt;4.3 Test Recovery After Restarting the Tmux Server
&lt;/h3&gt;&lt;p&gt;To verify that session recovery works across Tmux server restarts, follow these steps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Save the current environment&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Start or enter a Tmux session:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Press:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + b
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + s
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Make sure the save operation succeeds.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Stop the Tmux server&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Open a regular terminal and execute:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux kill-server
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note: This terminates all sessions managed by the current Tmux server. Make sure your session has been saved before running this command.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3: Start Tmux again&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you installed only &lt;code&gt;tmux-resurrect&lt;/code&gt;, manually trigger restoration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + b
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Ctrl + r
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you also installed &lt;code&gt;tmux-continuum&lt;/code&gt; and enabled automatic restoration, it will attempt to restore the most recently saved environment when the Tmux server starts.&lt;/p&gt;
&lt;p&gt;One important distinction: &lt;code&gt;tmux-continuum&lt;/code&gt; does not automatically launch the Tmux process at the operating system level. After a system reboot, you still need a mechanism such as a login script, shell configuration, or systemd service to start Tmux. Automatic restoration only happens after the Tmux server has started.&lt;/p&gt;
&lt;h2 id="5-common-issues-and-solutions"&gt;5. Common Issues and Solutions
&lt;/h2&gt;&lt;h3 id="51-prefix--i-does-nothing"&gt;5.1 Prefix + I Does Nothing
&lt;/h3&gt;&lt;p&gt;Check the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TPM has been cloned into &lt;code&gt;~/.tmux/plugins/tpm&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.tmux.conf&lt;/code&gt; contains the TPM initialization command.&lt;/li&gt;
&lt;li&gt;You have reloaded the Tmux configuration.&lt;/li&gt;
&lt;li&gt;You are pressing uppercase &lt;code&gt;I&lt;/code&gt;, not lowercase &lt;code&gt;i&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also verify that the TPM initialization script exists:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ls ~/.tmux/plugins/tpm/tpm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="52-ctrl--s-or-ctrl--r-does-not-work"&gt;5.2 Ctrl + s or Ctrl + r Does Not Work
&lt;/h3&gt;&lt;p&gt;First, check whether the plugins have been installed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ls ~/.tmux/plugins/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You should see directories similar to:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tpm/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux-resurrect/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux-continuum/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the plugin directories are missing, run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Prefix + I
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the plugins are installed but the keybindings still do not work, check for conflicting keybindings:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux list-keys &lt;span class="p"&gt;|&lt;/span&gt; grep -E &lt;span class="s1"&gt;&amp;#39;C-s|C-r&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Another possible cause is terminal flow control (XON/XOFF). Some terminal environments interpret &lt;code&gt;Ctrl + s&lt;/code&gt; as a flow-control shortcut and intercept the key before Tmux receives it.&lt;/p&gt;
&lt;p&gt;You can disable this behavior with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stty -ixon
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To make the change persistent, add the command to your &lt;code&gt;~/.bashrc&lt;/code&gt; or &lt;code&gt;~/.zshrc&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="53-automatic-restoration-is-not-working"&gt;5.3 Automatic Restoration Is Not Working
&lt;/h3&gt;&lt;p&gt;If manual restoration works but automatic restoration does not, check the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tmux-continuum&lt;/code&gt; is installed.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;set -g @continuum-restore 'on'&lt;/code&gt; is present in your configuration.&lt;/li&gt;
&lt;li&gt;Both plugins have been installed and loaded successfully.&lt;/li&gt;
&lt;li&gt;You have actually restarted the Tmux server.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Running &lt;code&gt;source-file ~/.tmux.conf&lt;/code&gt; does not trigger automatic restoration. &lt;code&gt;tmux-continuum&lt;/code&gt; performs automatic restoration only when the Tmux server starts.&lt;/p&gt;
&lt;p&gt;Automatic saving also requires the Tmux status line to be enabled. If another plugin or theme overwrites the &lt;code&gt;status-right&lt;/code&gt; configuration, the automatic save mechanism may stop working.&lt;/p&gt;
&lt;p&gt;If this happens, try placing &lt;code&gt;tmux-continuum&lt;/code&gt; at the end of your TPM plugin list.&lt;/p&gt;
&lt;h3 id="54-no-saved-session-files-found"&gt;5.4 No Saved Session Files Found
&lt;/h3&gt;&lt;p&gt;Check the default save directory:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ls -lah ~/.tmux/resurrect/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the directory does not exist, try manually saving the current environment:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Prefix + Ctrl + s
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Also make sure the current user has permission to read and write to the directory.&lt;/p&gt;
&lt;h2 id="6-understanding-the-limitations-of-tmux-resurrect"&gt;6. Understanding the Limitations of Tmux-Resurrect
&lt;/h2&gt;&lt;p&gt;Although &lt;code&gt;tmux-resurrect&lt;/code&gt; can restore most of your Tmux environment, it is not a full process snapshot or checkpointing system.&lt;/p&gt;
&lt;p&gt;It is important to understand the difference.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What it can restore:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Session, window, and pane structures.&lt;/li&gt;
&lt;li&gt;Pane layouts and ordering.&lt;/li&gt;
&lt;li&gt;Working directories.&lt;/li&gt;
&lt;li&gt;Active windows and panes.&lt;/li&gt;
&lt;li&gt;Selected supported terminal applications.&lt;/li&gt;
&lt;li&gt;Optionally, pane history contents.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What it cannot guarantee:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The complete runtime state of every running process.&lt;/li&gt;
&lt;li&gt;Unsaved in-memory application data.&lt;/li&gt;
&lt;li&gt;Previously established database or SSH connections.&lt;/li&gt;
&lt;li&gt;The execution state of complex interactive scripts.&lt;/li&gt;
&lt;li&gt;Internal application state, such as unsaved editor changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For Vim and Neovim users, additional editor session recovery can be configured through &lt;code&gt;tmux-resurrect&lt;/code&gt;, allowing the editor&amp;rsquo;s own session mechanism to restore files and window layouts.&lt;/p&gt;
&lt;p&gt;In other words, &lt;code&gt;tmux-resurrect&lt;/code&gt; restores your terminal working environment. It does not freeze and resume every application exactly where it left off.&lt;/p&gt;
&lt;h2 id="7-conclusion"&gt;7. Conclusion
&lt;/h2&gt;&lt;p&gt;By combining TPM, &lt;code&gt;tmux-resurrect&lt;/code&gt;, and &lt;code&gt;tmux-continuum&lt;/code&gt;, you can build a simple but effective session persistence solution for Tmux.&lt;/p&gt;
&lt;p&gt;Each component has a specific responsibility:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Component&lt;/th&gt;
					&lt;th&gt;Responsibility&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;TPM&lt;/td&gt;
					&lt;td&gt;Installs, manages, and loads Tmux plugins&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;tmux-resurrect&lt;/td&gt;
					&lt;td&gt;Manually saves and restores Tmux environments&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;tmux-continuum&lt;/td&gt;
					&lt;td&gt;Automatically saves sessions and restores them when Tmux starts&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For developers who frequently connect to remote servers through SSH, manage multiple projects, or maintain long-running development environments, this combination can significantly reduce the repetitive work of rebuilding terminal sessions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One final recommendation:&lt;/strong&gt; If your development environment is important, periodically check the saved files in &lt;code&gt;~/.tmux/resurrect/&lt;/code&gt; and keep your essential configuration files under Git version control.&lt;/p&gt;
&lt;p&gt;Session restoration is a convenient productivity feature, but it should never replace proper data backups.&lt;/p&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/tmux-plugins/tpm" target="_blank" rel="noopener"
 &gt;Tmux Plugin Manager (TPM)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/tmux-plugins/tmux-resurrect" target="_blank" rel="noopener"
 &gt;Tmux Resurrect&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/tmux-plugins/tmux-continuum" target="_blank" rel="noopener"
 &gt;Tmux Continuum&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>