tmux wengyc
What is tmux? terminal multiplexer 可以開很多分頁(terminal)
What is tmux?
What is tmux?
What is tmux?
Why should I use tmux?
Why should I use tmux?
Why should I use tmux? 程式 debug 到一半沒存檔斷線? 更新到一半斷線?
同時管理多個 session, window, pane 保留工作狀態隨時 attach/detach 強大的畫面分割 Advantage of tmux 同時管理多個 session, window, pane 保留工作狀態隨時 attach/detach 強大的畫面分割 同時 attach => 分享畫面
Start tmux tmux tmux attach [ -t <number> ] tmux detach tmux ls tmux kill-session [ <number> ]
Tmux - session, window, pane session - browser window - tab pane - split window
Tmux - session, window, pane
tmux 101
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 '%%'"
more skill
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
Tmux - session, window, pane
Bindkey - session 多開幾個瀏覽器
Tmux - bindkey bindkey + ?
Tmux - command command bindkey + :
Feel unfriendly?
Configuration - tmux.conf design yourself style colorful
Configuration - tmux.conf
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
Configuration - set ~/.tmux.conf set-window-option ( alias: setw )
Configuration - set
Tmux v.s. Screen Tmux Screen 畫面切割 detach 還在 detach 消失 可分割上下&左右 僅能切上下(預設) 不同 session 不同分割 分割後每個 session 相同 session 可直接切換 需要 detach 再重新 attach 可同時在同一個 session 一個 session 只能一個人 profile .tmux.conf .screenrc 客製化狀態列 可更改處較少
Tmux - share session 共同編輯
Q&A