Originally published February 6, 2018 @ 4:10 pm

Just a list of commands to quickly configure tmux with some of the best (i.e. my favorite) plugins and options. Feel free to disagree – you may be right – but I don’t think so.

The settings below are for tmux v 2+. If you’re running an older distro and for some reason can’t upgrade, you would need to figure out a way to install the newer version of tmux for your distro. Here’s an example for CentOS 6:

yum -y erase tmux
curl -s0 -k -w3 https://gist.githubusercontent.com/pokev25/4b9516d32f4021d945a140df09bf1fde/raw/1b37bad028d82180f8de306476b492cd68cc02b4/install-tmux.sh > ~/install-tmux.sh
chmod 750 ~/install-tmux.sh
pkill tmux
tmux -V

Get a tmux cheatsheet and add a convenient bash alias.
curl -s0 -k  -w5 https://gist.githubusercontent.com/remarkablemark/c366603f6cf364f157a7dd67ad246f8b/raw/0013ab0e62a84215bb604a5eaad1581989bb9204/tmux-cheatsheet.md | sed 's/\^b/^a/g' > ~/.tmux-cheatsheet.md
echo "alias tmuxhelp='cat ~/.tmux-cheatsheet.md | column -s\"|\" -t'" >> ~/.bashrc
source ~/.bashrc

Get the .tmux.conf file.
curl -s0 -k -w5 https://raw.githubusercontent.com/gpakosz/.tmux/master/.tmux.conf > ~/.tmux.conf

Install tmux plugin manager and resurrect plugin
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
cat << EOF >> ~/.tmux.conf
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
run '~/.tmux/plugins/tpm/tpm'

# start tmux tmux new -s `whoami`01 
# activate plugin manager and load the resurrect plugin 

# save tmux session

# restore tmux session