MiscellaneousN/A (used in scripts)
send-keys
Short form: send
Send keys to a pane. This is useful for scripting tmux to automate commands.
Synopsis
bash
tmux send-keys [-FHlMRX] [-N repeat-count] [-t target-pane] key...Options
| Flag | Description |
|---|---|
| -l | Disable key name lookup (send literal string) |
| -R | Reset terminal state before sending |
| -H | Keys are hex codes (e.g., 0x41 for 'A') |
| -N repeat-count | Repeat the key sequence N times |
| -t target-pane | Send to specified pane |
Examples
Type and execute 'ls -la'
bash
tmux send-keys 'ls -la' EnterRun npm start in pane 1
bash
tmux send -t 1 'npm start' C-mSend Ctrl+C (interrupt)
bash
tmux send-keys C-cSend literal 'hello'
bash
tmux send-keys -l 'hello'Default Keybinding
N/A (used in scripts)
Default prefix is Ctrl+b
Pro Tips
- •Use C-m or Enter for carriage return
- •Great for startup scripts that need to run commands in panes
- •C-c sends interrupt, C-d sends EOF