Pane ManagementN/A
respawn-pane
Short form: respawnp
Reuse a pane to run a command, restarting it in place without changing the layout. Handy for re-running a dead or crashed pane.
Synopsis
bash
tmux respawn-pane [-k] [-c start-directory] [-e environment] [-t target-pane] [shell-command [argument ...]]Options
| Flag | Description |
|---|---|
| -k | Kill the existing command first if it is still running |
| -c start-directory | Set the working directory |
| -e environment | Set an environment variable (NAME=value) |
| -t target-pane | Pane to respawn |
Examples
Restart the pane's command, killing the old one
bash
tmux respawn-pane -kRespawn pane 1 running top
bash
tmux respawnp -t 1 'top'Default Keybinding
N/A
Default prefix is Ctrl+b
Pro Tips
- •Set remain-on-exit on to keep dead panes around for respawning
- •Great for restarting a crashed dev server in the same spot