Install tmux 2 on a CentOS 7 host

As we all know, most of the packages provided by the official repository of CentOS 7 are outdated. In most cases, we must rely on third-party repositories to install newer software.

I introduce you to my favorite IUS repository that provides latest upstream versions of most of the packages. IUS offers safe replacement and the IUS packages use different names than their stock equivalents. Therefore, it is pretty safe for newbie.

You have to epel-release provided by Fedora when installing ius-release, because many IUS packages have dependencies from the EPEL repository.

yum install -y \ \

If you have previously installed tmux, you must uninstall the stock tmux, otherwise you will encounter installation conflicts.

yum remove -y tmux

Now, we are safe to install tmux provided by IUS.

yum install -y tmux2u

If you encounter the following problem while executing tmux, it means that there is an old tmux session in the background. You must close it to use the new tmux.

protocol version mismatch (client 8, server 7)

You can use pgrep to find the pid of the old tmux session.

pgrep tmux

For example, the pid of my tmux is 1287. So, we can use the following command to reattach it and exit the session.

/proc/1287/exe attach

That's all. Hope you enjoy.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.