Linux Administrator

How to Install Tmux from Source

Tmux is a terminal multiplexer. Terminal multiplexer allow you to switch easily between several programs in one terminal, you can detach them (keep running in the background) and reattach them again to a different terminal.

In this article I will show how you can install tmux on your Linux system from source.

Install Tmux from Source

Follow the below steps to install tmux on your system.

Step #1 : Install Libevent

First of all install libevent package on your system. Follow the below command to download and install libevent from its official website,

# wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz

After downloading, extract it and configure and install.

# tar xvf libevent-2.0.22-stable.tar.gz
# cd libevent-2.0.22-stable
# ./configure
# make # use make -j 8 to speed it up if your machine is capable
# make install

Step #2 : Install Tmux

Now download and install the Tmux tarball from its official website. As of writing this blog, the latest version is 2.2.

# wget https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz
# tar xvf tmux-2.2
# ./configure
# make
# make install

If you are getting below error while install tmux you will need to install gcc package on your system.

#./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/tmux-2.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

Step #3 : Install GCC

Follow the below command to Install GCC package.

# yum install gcc

Step #4 : Testing

Run the below command to test your tmux installed version.

# tmux -V
tmux 2.2
Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment