Tmux is a terminal multiplexer that enhances your command-line productivity by allowing you to manage multiple terminal sessions within a single window.
- Start a new session:
tmux - List existing sessions:
tmux list-sessions - Attach to a session:
tmux attach-session -t session_name - Detach from session:
Ctrl-b d
- Create a new window:
Ctrl-b c - Switch between windows:
Ctrl-b n(next),Ctrl-b p(previous) - Split current pane vertically:
Ctrl-b % - Split current pane horizontally:
Ctrl-b " - Close current pane:
Ctrl-b x
- Navigate between panes:
Ctrl-b arrow keys - Resize panes:
Ctrl-b :, thenresize-pane -U/D/L/Rfollowed by a number
- Enter copy mode:
Ctrl-b [orCtrl-b PgUp - Scroll using arrow keys or mouse
- Exit copy mode:
q
- Rename current window:
Ctrl-b , - Rename current pane:
Ctrl-b ,
- Rename session:
Ctrl-b $ - Show time in status bar:
Ctrl-b t - Reload configuration:
Ctrl-b : source-file ~/.tmux.conf
- Connect to remote session:
ssh user@remote_host 'tmux attach-session -t session_name' - Detach from remote session:
Ctrl-b d - Reattach to remote session:
ssh user@remote_host 'tmux attach-session -t session_name'
- Tmuxinator: Tool for defining and managing Tmux sessions for specific projects.
- Customization: Modify
.tmux.confin your home directory for custom key bindings and settings.
Remember, Tmux's power lies in exploration and practice. Have fun enhancing your terminal workflow with Tmux!