arch维基: https://wiki.archlinux.org/index.php/tmux_(简体中文)
官方wiki:
tmux new -s ok # 创建名为ok的会话 tmux ls # 显示会话列表 tmux a # 连接上一个会话 tmux a -t ok # 连接指定会话 tmux rename -t s1 s2 # 重命名会话s1为s2 tmux kill-session # 关闭上次打开的会话 tmux kill-session -t s1 # 关闭会话s1 tmux kill-session -a -t s1 # 关闭除s1外的所有会话 tmux kill-server # 关闭所有会话
prefix
指c-b
(默认)
c-b
指ctrl+b
prefix
可在配置.tmux.conf
文件中替换,建议替换为c-a
prefix + %
左右分割窗格prefix + "
上下分割窗格prefix + x
关闭当前窗格prefix + {
当前窗格前移prefix + }
当前窗格后移prefix + o
顺时针切换窗格prefix + c-o
逆时针旋转当前窗口的窗格prefix + space
重新排列当前窗口下的所有窗格prefix + ;
上次使用窗格prefix + !
将当前窗格置于新窗口prefix + z
最大化当前窗格,再次按下恢复prefix + up|down|left|right
根据箭头方向切换窗格prefix + c
新建窗口prefix + w
窗口列表prefix + p
切换至上一窗口prefix + n
切换至下一窗口prefix + ,
重命名窗口prefix + .
修改当前窗口索引编号prefix + 0-9
根据id索引编号切换窗口prefix + f
根据窗口名查找窗口,模糊匹配prefix + s
session列表prefix + $
重命名sessionprefix + d
分离当前sessionprefix + d
分离指定session# open mouse set -g mouse on # switch prefix set -g prefix c-a # key-bind bind | split-window -h bind - split-window -v bind -n s-left previous-window bind -n s-right previous-window # switch panels bind k selectp -u # switch to panel up bind j selectp -d # switch to panel down bind h selectp -l # switch to panel left bind l selectp -r # switch to panel right bind q killp # kill panel # status justify center set-option -g status-justify centre # left bottom #set-option -g status-left '#[bg=black,fg=green][#[fg=cyan]#s#[fg=green]]' #set-option -g status-left-length 20 # window list setw -g automatic-rename on set-window-option -g window-status-format '#[dim]#i:#[default]#w#[fg=grey,dim]' set-window-option -g window-status-current-format '#[fg=cyan,bold]#i#[fg=blue]:#[fg=cyan]#w#[fg=dim]' # right bottom set -g status-right '[%y-%m-%d %h:%m]' # easy config reload bind-key r source-file ~/.tmux.conf \; display-message "config reloaded"
如对本文有疑问, 点击进行留言回复!!
linux下文本编辑器vim的使用方法(复制、粘贴、替换、行号、撤销、多文件操作)
网友评论