Tutorial for terminal multiplexers
Bash commands for tmux
tmux list-commands
tmux new # new-session
tmux ls # list-sessions
tmux attach # attach-sessions
Useful shortcuts in the session
- Switch sessions
Ctrl+b, s
# Display the sessions list, and then use [←,↑,→,↓] to select which panes
- Rename current session
Ctrl+b, $ # Shift+4
- Detach current session (Exit the tmux)
Ctrl+b, d
- Run tmux Command
Ctrl+b, : # Shift+;
Shortcuts for Windows
- Create a new window
Ctrl+b, c # c, Create
- Rename current window
Ctrl+b, ,
- Switch windows
Ctrl+b, [p,n] # PgUp, PgDn?
Ctrl+b, [0,1,...] # Switch to the special window
Ctrl+b, w
# Display the windows list, and then use [←,↑,→,↓] to select which windows
Shortcuts for Pane
- Splits the current pane vertically (Use "|" to split)
Ctrl+b, " # Shift+'
- Splits the current pane horizontally (Use "—" to split)
Ctrl+b, % # Shift+5
- Switch panes
Ctrl+b, [←,↑,→,↓]
Ctrl+b, q, [0,1,...] # Query
Ctrl+b, o # Order traversal
- Swap panes
Ctrl+b, [{,}] # Shift+[, Shift+]
- Kill pane
Ctrl+b, x # If there's only one pane, the whole windows will be killed.
Config tmux
modify the ~/.tmux.confg