Skip to content

Instantly share code, notes, and snippets.

@nanmu42
Last active May 7, 2024 09:24
Show Gist options
  • Save nanmu42/97e7d476bbd89301fc74ed23eb0cd65a to your computer and use it in GitHub Desktop.
Save nanmu42/97e7d476bbd89301fc74ed23eb0cd65a to your computer and use it in GitHub Desktop.
Update tmux to latest version
#!/usr/bin/env bash
set -e
# dependecies
apt update
apt install -y git automake build-essential pkg-config libevent-dev libncurses5-dev byacc
# where our temp file locates
rm -rf /tmp/tmux
git clone https://github.com/tmux/tmux.git /tmp/tmux
cd /tmp/tmux
bash autogen.sh
./configure && make
make install
cd -
# clean up
rm -rf /tmp/tmux
@nanmu42
Copy link
Author

nanmu42 commented Jan 24, 2022

Thanks for your kindly suggestions guys!

I have updated the script.

@ismet55555
Copy link

ismet55555 commented Mar 26, 2022

This is great! Thank you.
One thing to mention here to anyone running this. Make sure at the very end to reload your shell before running tmux -V

Edit

I used it to make a install script that should work with Debian and CentOS based systems. This doesn't depend on git and builds a specified version from source.

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