tmux Cheat Sheet

June - 2021

Session Commands

| Action                    | Command          |
|---------------------------|------------------|
| Start a named session     | tmux new -s NAME |
| Detach from session       | Ctrl+b d         |
| List sessions             | tmux ls          |
| Reattach to named session | tmux a -t NAME   |

Window Pane Commands

| Action                       | Command               |
|------------------------------|-----------------------|
| Make vertical window panes   | Ctrl+b %              |
| Make horizontal window panes | Ctrl+b "              |
| Switch panes                 | Ctrl+b <arrow>        |
| Resize pane (mac)            | Ctrl+b :resize-p -L 4 |
| Resize pane (GNU)            | Ctrl+b Ctrl+<arrow>   |
Note: The `Ctrl+b :resize-p -D 4` command means to press `Ctrl+b` then press `:` to enter the command line for the rest of the command (e.g. `resize-p -D 4`). The `-D` flag indicates down. The other options are `-U` for up, `-L` for left, and `-R` for right. The "4" in the example is the amount that can be changed to your desired setting.

Window Commands

| Action                  | Command  |
|-------------------------|----------|
| Create new window       | Ctrl+b c |
| Move to next window     | Ctrl+b n |
| Move to previous window | Ctrl+b p |