Skip to main content
Back to Commands
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

FlagDescription
-kKill the existing command first if it is still running
-c start-directorySet the working directory
-e environmentSet an environment variable (NAME=value)
-t target-panePane to respawn

Examples

Restart the pane's command, killing the old one

bash
tmux respawn-pane -k

Respawn 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