Download presentation
Presentation is loading. Please wait.
1
Tmux zjlin
2
What is tmux? terminal multiplexer 可以開很多分頁(terminal)
3
What is tmux?
4
What is tmux?
5
What is tmux?
6
Why should I use tmux?
7
Why should I use tmux?
8
Why should I use tmux? 程式 debug 到一半沒存檔斷線? 更新到一半斷線?
9
同時管理多個 session, window, pane 保留工作狀態隨時 attach/detach 強大的畫面分割
Advantage of tmux 同時管理多個 session, window, pane 保留工作狀態隨時 attach/detach 強大的畫面分割 同時 attach => 分享畫面
10
Start tmux tmux tmux attach [ -t <number> ] tmux detach tmux ls
tmux kill-session [ <number> ]
11
Tmux - session, window, pane
session - browser window - tab pane - split window
12
Tmux - session, window, pane
13
tmux 101
14
bindkey (default is C-b)
Bindkey - window bindkey (default is C-b) //C === control c new-window n next-window p previous-window l last-window <num> select-window -t := <num> & confirm-before -p "kill-window #W? (y/n)" kill-window , command-prompt -I "#W" "rename-window '%%'" . command-prompt "move-window -t '%%'"
15
more skill
16
bindkey (default is C-b)
Bindkey - pane bindkey (default is C-b) //C === control % split-window -h “ split-window 方向鍵 select-pane alt+方向鍵 resize-pane x confirm-before -p "kill-pane #P? (y/n)" kill-pane { swap-pane -U } swap-pane -D
17
Tmux - session, window, pane
18
Bindkey - session 多開幾個瀏覽器
19
Tmux - bindkey bindkey + ?
20
Tmux - command command bindkey + :
21
Feel unfriendly?
22
Configuration - tmux.conf
design yourself style colorful
23
Configuration - tmux.conf
24
Configuration - bindkey
~/.tmux.conf bind-key ( alias: bind ) C ( alias: <Ctrl> ) M ( alias: <Alt> ) bind-key <key> <command> -T key-table ( default table is prefix ) -n : alias for -T root -r : repeat
25
Configuration - set ~/.tmux.conf set-window-option ( alias: setw )
26
Configuration - set
27
Tmux v.s. Screen Tmux Screen 畫面切割 detach 還在 detach 消失 可分割上下&左右
僅能切上下(預設) 不同 session 不同分割 分割後每個 session 相同 session 可直接切換 需要 detach 再重新 attach 可同時在同一個 session 一個 session 只能一個人 profile .tmux.conf .screenrc 客製化狀態列 可更改處較少
28
Tmux - share session 共同編輯
29
Q&A
Similar presentations