配置.tmux.conf如下
unbind C-b │ set -g prefix C-a │ setw -g mode-keys vi │ bind -t vi-copy v begin-selection │ bind -t vi-copy y copy-selection
然后執(zhí)行tmux source-file ~/.tmux.conf
在.bashrc中添加如下,使得默認打開termianl時就打開tmux
if command -v tmux>/dev/null; then [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux fi