Install tmux latest version on Ubuntu

sudo apt install automake build-essential pkg-config libevent-dev libncurses5-dev -y

VERSION=3.1b
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xf tmux-${VERSION}.tar.gz
rm tmux-${VERSION}.tar.gz

cd tmux-${VERSION}

./configure
# or for static build use
./configure --prefix=/usr/myownbuilds --enable-static

make -j$(nproc)
sudo make install
cd ..
sudo rm -rf /usr/local/src/tmux-*
sudo mv tmux-${VERSION} /usr/local/src

sudo killall -9 tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
wget https://raw.githubusercontent.com/Dibbyo456/configs/master/tmux/tmux.conf
mv tmux.conf ~/.config/tmux/tmux.conf
tmux source-file ~/.config/tmux/tmux.conf
# While in a tmux session
Shift + I  --> Install plugins.
Shift + U  --> Update plugins.