---
title: tmux
category: CLI
+layout: 2017/sheet
---
### Commands
$ tmux new -s session_name
$ tmux attach # Default session
- $ tmux attach -s session_name
+ $ tmux attach -t session_name
$ tmux switch -t session_name
C-b hkjl # navigation
C-b HJKL # resize
C-b o # next window
+ C-b q # show pane numbers
C-b x # close pane
C-b { or } # move windows around
### Attribute/colors
+| Key | Description |
+| --- | --- |
| `#[fg=1]` | standard color |
| `#[fg=yellow]` | yellow |
| `#[bold]` | bold |
### Variables
+| Key | Description |
+| --- | --- |
| `#(date)` | shell command |
| `#I` | window index |
| `#S` | session name |