It has become fashionable to run distribution upgrade in a tmux terminal to avoid remote connection issues or issues with the X server (e.g. opensuse documentation).

Yet this does not take into account the risk of having a version mismatch between the already upgraded tmux client and the server that manages the terminal where the distribution upgrade is running.

To materialize the risk one has to leave the tmux console for the normal terminal during the upgrade. If tmux client is upgraded in the meantime one would not be able to reattach to the tmux session. Instead running tmux attach or tmux ls one would get

# tmux ls
protocol version mismatch (client 7, server 6)

I ran into this client 7, server 6 version mismatch when upgrading from OpenSUSE 12.2 to 12.3. A quick solution I could come up with was to download the tmux rpm from the old distribution repository and unpack it with cpio since the machine had a network connection in the process of the upgrade.

wget http://download.opensuse.org/distribution/12.2/repo/oss/suse/i586/tmux-1.6-2.1.2.i586.rpm
rpm2cpio ../tmux-1.6-2.1.2.i586.rpm > tmux-1.6.cpio
cpio -i -d < tmux-1.6.cpio

Should one put a warning on the possible version mismatch when running distro upgrade in a tmux session? Is there an easy way to make tmux client run in a mode compatible with older servers?


2 Answers 2


You can attach to an existing tmux without having to download an old version.

Shutdown all your sessions and resume as soon as possible though, as this is clearly an ugly hack; it's just very useful in a pinch:

"/proc/$(pgrep -o tmux)/exe" attach
  • Perhaps this works in some/most cases but it didn't work for me Commented Aug 4, 2015 at 8:55
  • this just saved my life on a ubuntu upgrade! Commented Jan 13, 2023 at 21:16

You could try to upgrade just tmux first, and then perform the full upgrade. With some luck, the currently installed system libraries versions will satisfy the dependencies for the new tmux version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .