1. 安装

git clone git@github.com:tmux/tmux.git
cd tmux
sh autogen.sh
./configure && make

2. 配置

再配合zsh使用时会出现提示代码为白色的现象,需要修改~/目录下的.tmux.conf

set -g default-terminal "tmux-256color"

为了让tmux支持鼠标操作,需要继续加入内容

set-option -g mouse on

3. 使用

tmux的使用可参考博客

4. 多窗口同步操作

修改~/目录下的.tmux.conf

vim ~/.tmux.conf
bind-key s setw synchronize-panes
source ~/.tmux.conf

便可以通过按Ctrl+b s来切换同步输入