Skip to content

Instantly share code, notes, and snippets.

@eculver
Created March 16, 2015 18:54
Show Gist options
  • Select an option

  • Save eculver/06855b7e8bdb26f1ebfd to your computer and use it in GitHub Desktop.

Select an option

Save eculver/06855b7e8bdb26f1ebfd to your computer and use it in GitHub Desktop.
How to deal with tmux "protocol version mismatch"
$ tmux attach
protocol version mismatch (client 7, server 6)
$ pgrep tmux
3429
$ /proc/3429/exe attach
@pmelange

pmelange commented Jun 2, 2019

Copy link
Copy Markdown

This just helped me too. Thanks

@JHerseth

JHerseth commented May 7, 2020

Copy link
Copy Markdown

This helped me with the error "server version is too old for client" which gives a whopping 3 hits on google. Commenting here so that someone else googleing this will find this.

@bitraft

bitraft commented May 11, 2020

Copy link
Copy Markdown

Is there a solution for macOS ?

@strazto

strazto commented Sep 5, 2020

Copy link
Copy Markdown

By the way, if all else is failing, and you installed your first version from distro, and your second version from source (In my case, i installed tmux 3.0a from apt-get install, then I wanted to upgrade to 3.1b , so installed from source)

apt remove tmux , and then following the source install instructions should work

@polvanrijn

polvanrijn commented Feb 19, 2022

Copy link
Copy Markdown

Here's a oneliner:

$(echo "/proc/`pgrep -o tmux -u $(whoami)`/exe attach")

On multi-user systems (e.g. on HPCs), you might need to filter by your own username. You can also add the function to your .bash_profile, e.g.:

function last_tmux(){
    $(echo "/proc/`pgrep -o tmux -u $(whoami)`/exe attach")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment