Skip to content

Instantly share code, notes, and snippets.

@P7h
Last active November 22, 2023 11:28
Show Gist options
  • Save P7h/91e14096374075f5316e to your computer and use it in GitHub Desktop.
Save P7h/91e14096374075f5316e to your computer and use it in GitHub Desktop.
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.7
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
./configure
sudo make install
cd -
sudo rm -rf /usr/local/src/tmux-*
sudo mv tmux-${VERSION} /usr/local/src
## Logout and login to the shell again and run.
## tmux -V
# Steps to build and install tmux from source on Ubuntu.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.7
sudo apt-get -y remove tmux
sudo apt-get -y install wget tar libevent-dev libncurses-dev
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
./configure
make
sudo make install
cd -
sudo rm -rf /usr/local/src/tmux-*
sudo mv tmux-${VERSION} /usr/local/src
## Logout and login to the shell again and run.
## tmux -V
##########################################################################################
##### Please check the installation from source, which is easy and fast.
##########################################################################################
# tmux v2.3 installation steps for Ubuntu [various OS versions]
sudo apt-get update -yqqu
sudo add-apt-repository -yu ppa:pi-rho/dev
sudo apt-get update -yqqu
sudo apt-get install -yqqu python-software-properties software-properties-common
sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu16.04.1
# sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu15.10.1
# sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu15.04.1
# sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu14.04.1
# sudo apt-get install -yqq tmux-next=2.3~20160913~bzr3547+20-1ubuntu1~ppa0~ubuntu12.04.1
tmux-next -V
# tmux v2.0 installation steps for Ubuntu 14.04 (Trusty Tahr)
tmux -V
sudo apt-get update -yqqu
sudo apt-get install -yqqu python-software-properties software-properties-common
sudo add-apt-repository -yu ppa:pi-rho/dev
sudo apt-get update -yqqu
sudo apt-get install -yqqu tmux
# sudo apt-get install -yqqu tmux=2.0-1~ppa1~t
tmux -V
# tmux v1.9 installation steps for Ubuntu 14.04 (Trusty Tahr)
sudo apt-get update -yqqu
sudo apt-get install -yqqu python-software-properties software-properties-common
sudo add-apt-repository -yu ppa:pi-rho/dev
sudo apt-get update -yqqu
sudo apt-get install -yqqu tmux=1.9a-1~ppa1~t
tmux -V
# On Ubuntu 12.04 (Precise Pangolin), step 5 would be: sudo apt-get install -y tmux=1.9a-1~ppa1~p
# On Ubuntu 13.10 (Saucy Salamander), step 5 would be: sudo apt-get install -y tmux=1.9a-1~ppa1~s
@08solsticegxp
Copy link

08solsticegxp commented Nov 26, 2016

run one at a time.
sudo add-apt-repository ppa:pi-rho/dev
sudo apt-get update
sudo apt-get install tmux-next=2.3~20161124~bzr3624+20-1ubuntu1~ppa0~ubuntu16.04.1

@vwal
Copy link

vwal commented Jan 9, 2017

Or just use plain "tmux-next" as in sudo apt-get install tmux-next

For the latest version available in the launchpad repo, go to https://launchpad.net/~pi-rho/+archive/ubuntu/dev and look for the package name on the list for your Ubuntu release. It seems the latest "tmux-next" package as of writing of this message is actually version 2.4 even though the string for it is: 2.3~20170107~bzr3641+20-1ubuntu1~ppa0~ubuntu16.04.1

@GoodGuy98
Copy link

I ran this command to install:

sudo apt-get install tmux-next=2.320170128bzr3691+20-1ubuntu1ppa0ubuntu14.04.1

The command "tmux-next -V" produced this as output:

tmux-next master

I assume this is not the correct output value, so is there another method to determine the actual version number?
I am a total newbie to tmux.

Copy link

ghost commented Feb 25, 2017

@GoodGuy98 Same issue here

@anasayubi
Copy link

When run for 'Ubuntu various versions', I get the following error:
E: Version '2.320160913bzr3547+20-1ubuntu1ppa0ubuntu16.04.1' for 'tmux-next' was not found

@dremendes
Copy link

dremendes commented Apr 19, 2017

currently, you must replace
2.320160913bzr3547+20-1ubuntu1ppa0ubuntu16.04.1
with:
2.320170419bzr3777+20-1ubuntu1ppa0ubuntu16.04.1

@NYCJacob
Copy link

following the install from source worked on Ubuntu 16.04

@TristonC
Copy link

Thanks!

@shakyakrishna
Copy link

having trouble to configure $PWD to start on the new session while splitting on version 2.5 anyone?

@BirkhoffLee
Copy link

Thanks :)

@sylvoie
Copy link

sylvoie commented Sep 6, 2019

Thank you for CentOS steps!

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