Table of Contents
General Usage
-
tmux version
1 2$ tmux -V tmux 2.9a -
Start a tmux session with
1 2 3 4tmux tmux new tmux new -s mySessionName -n myWindowName # alias: new | new-session -
Attach to a tmux session:
1 2 3tmux a # attach to last session tmux a -t mysession # alias: a | at | attach | attach-session -
List tmux sessions:
1 2 3tmux ls tmux list-sessions # alias: ls | list-session | list-sessions -
Kill Session:
1tmux kill-session -t mySessionName
Shortcuts
| Key(s) | Description |
|---|---|
CTRL+b <command> |
sends <command> to tmux instead of sending it to the shell |
| General Commands | |
? |
shows a list of all commands (qcloses the list) |
: |
enter a tmux command |
| Working with Windows | |
c |
creates a new window |
, |
rename current window |
p |
switch to previous window |
n |
switch to next window |
w |
list windows (and then select with arrow keys) |
| Working with Panes | |
% |
split window vertically |
- |
split window horizontally requires bind - split-window -v in our .tmux.conf |
| → | go to right pane |
| ← | go to left pane |
| ↑ | go to upper pane |
| ↓ | go to lower pane |
| Working with Sessions | |
d |
detach from session |
Scripting tmux
Starting multiple commands in multiple panes
Start a new tmux session with tmux before running the script!
|
|
Configuring tmux
You can configure tmux via the ~/.tmux.conf file. After making changes to the config file, you can update the configuration “on-the-fly” with
|
|