Skip to main content
Back to Commands
MiscellaneousN/A

run-shell

Short form: run

Run a shell command (or, with -C, a tmux command) and show its output in the message line or a popup. Used heavily by plugins.

Synopsis

bash
tmux run-shell [-bCE] [-c start-directory] [-d delay] [-t target-pane] [shell-command [argument ...]]

Options

FlagDescription
-bRun in the background
-CRun a tmux command instead of a shell command
-d delayWait delay seconds before running
-t target-paneTarget pane

Examples

Run a command and show its output

bash
tmux run-shell 'uptime'

Initialize TPM in the background

bash
tmux run-shell -b '~/.tmux/plugins/tpm/tpm'

Default Keybinding

N/A

Default prefix is Ctrl+b

Pro Tips

  • -C runs tmux commands, e.g. run-shell -C 'new-window'
  • TPM and most plugins are loaded via run-shell at the end of .tmux.conf