tmux
-------------20150508 update----------------
http://mindonmind.github.io/notes/linux/tmux.html
PageUp/PageDown 翻页
q 显示窗口序号
o 循环切换到各窗口
x 关闭当前窗口
s 选择session
{/} 窗口交换
--------------------------------------------
https://linuxtoy.org/archives/from-screen-to-tmux.html
http://blog.csdn.net/chenbang110/article/details/8520192
http://blog.chinaunix.net/uid-26285146-id-3252286.html
http://www.opstool.com/article/253
screen风格的设置
#保存在个人home目录下 .tmux.conf #取消默认的设定键 unbind C-b unbind & unbind % unbind w unbind '"' #Escape键 set -g prefix C-a #解决bash ctrl a冲突问题 bind a send-prefix #窗口切分快捷键 bind \ split-window -h bind - split-window -v bind K confirm-before -p "kill-window #W? (y/n)" kill-window bind '"' choose-window #Pane之间切换的快捷键 bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R #Pane大小调整快捷键 bind < resize-pane -L 5 bind > resize-pane -R 5 bind _ resize-pane -D 5 bind + resize-pane -U 5 #设置window属性 setw -g window-status-current-bg red setw -g window-status-current-fg white setw -g window-status-current-attr bright setw -g window-status-attr bright setw -g window-status-format '#[fg=cyan,dim]#I#[fg=blue] #[default]#W#[fg=grey,dim]' setw -g window-status-current-format '#[fg=cyan,dim]#I#[fg=blue] #[default]#W#[fg=grey,dim]' #设置状态栏 set -g status-utf8 on set -g status-left "" set -g status-left-length 0 set -g status-interval 2 set -g status-fg white set -g status-bg blue set -g status-right "%Y/%m/%d %H:%M" set -g default-terminal "screen" #设置滚屏,屏幕历史长度 set -g history-limit 10000 set -g terminal-overrides 'xterm*:smcup@:rmcup@' setw -g mode-keys vi setw -g utf8 on #其他设置 set -sg escape-time 0
unbind C-b unbind & unbind % unbind w unbind '"' set -g prefix C-a bind a send-prefix bind \ split-window -h bind - split-window -v bind K confirm-before -p "kill-window #W? (y/n)" kill-window bind '"' choose-window bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R bind < resize-pane -L 5 bind > resize-pane -R 5 bind _ resize-pane -D 5 bind + resize-pane -U 5 setw -g window-status-current-bg red setw -g window-status-current-fg white setw -g window-status-current-attr bright setw -g window-status-attr bright setw -g window-status-format '#[fg=cyan,dim]#I#[fg=blue] #[default]#W#[fg=grey,dim]' setw -g window-status-current-format '#[fg=cyan,dim]#I#[fg=blue] #[default]#W#[fg=grey,dim]' set -g status-utf8 on set -g status-left "" set -g status-left-length 0 set -g status-interval 2 set -g status-fg white set -g status-bg blue set -g status-right "%Y/%m/%d %H:%M" set -g default-terminal "screen" set -g history-limit 10000 set -g terminal-overrides 'xterm*:smcup@:rmcup@' setw -g mode-keys vi setw -g utf8 on set -sg escape-time 0
bash偷懒
#vim .bash_profile alias tls="tmux ls" alias trx="tmux attach-session -t"
cenos6.5下安装tmux1.9过程
- 安装libevent(2.0版本及以上),添加*.so路径至/etc/ld.so.config,然后ldconfig
- yum install ncurses-devle
- 安装tmux(./configure && make && make install)