Skip to content

Instantly share code, notes, and snippets.

@eculver
Created March 16, 2015 18:54
Show Gist options
  • Star 24 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save eculver/06855b7e8bdb26f1ebfd to your computer and use it in GitHub Desktop.
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
@polvanrijn
Copy link

polvanrijn commented Feb 19, 2022

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