Table of common tmux shortcuts and commands:
| Action | Shortcut/Command |
|---|---|
| Start a new session | tmux or tmux new -s session_name |
| Detach from session | Ctrl-b, then d |
| List sessions | tmux ls |
| Attach to a session | tmux attach -t session_name |
| Kill a session | tmux kill-session -t session_name |
| Split window horizontally | Ctrl-b, then % |
| Split window vertically | Ctrl-b, then " (double quote) |
| Navigate between panes | Ctrl-b, then arrow keys |
| Resize panes | Ctrl-b, then hold Ctrl + arrow keys |
| Create a new window | Ctrl-b, then c |
| Switch between windows | Ctrl-b, then n (next) or p (previous) |
| Switch directly to a window | Ctrl-b, then 0 to 9 (number keys) |
| Rename a window | Ctrl-b, then , (comma) |
| Exit a pane | exit |
| Kill a window | Ctrl-b, then & |
| Reload configuration | Ctrl-b, then : (colon), then type source-file ~/.tmux.conf |
You can customize
tmuxby editing the configuration file~/.tmux.conf. Here’s a basic example of what you might put in your configuration file: