# default-command

Source: https://libtmux.org/en/tmux/latest/catalog/options/default-command/

> Set the command used for new windows (if not specified when the window is created) to shell-command, which may be any sh(1) command.

option tmux3.7c

Set the command used for new windows (if not specified when the window is created) to shell-command, which may be any sh(1) command.

* Scope

  session

* Type

  Text

* Set

  [`set-option`](https://libtmux.org/en/tmux/latest/manual/set-option/) `default-command value`

* Read

  [`show-options`](https://libtmux.org/en/tmux/latest/manual/show-options/) `default-command`

## Description[#](https://libtmux.org/en/tmux/latest/catalog/options/default-command/#description)

Set the command used for new windows (if not specified when the window is created) to `shell-command`, which may be any [sh(1)]() command. The default is an empty string, which instructs `tmux` to create a login shell using the value of the [`default-shell`](https://libtmux.org/en/tmux/latest/catalog/options/default-shell/) option.

## Releases[#](https://libtmux.org/en/tmux/latest/catalog/options/default-command/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/options/default-command/) : present
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/options/default-command/) : present

## Source[#](https://libtmux.org/en/tmux/latest/catalog/options/default-command/#source)

* Defined in

  [`options-table.c:595`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options-table.c#L595)

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/latest/reference/c-variable-options_table/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/latest/manual/full/#options-default-command)

## Used by[#](https://libtmux.org/en/tmux/latest/catalog/options/default-command/#used-by)

Library documentation that names this option.

* Python

  [`libtmux_mcp.tools.option_tools.set_option`](https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-option_tools-set_option/)

* Rust

  [`options.generated.DEFAULT_COMMAND`](https://libtmux.org/en/rs/latest/reference/options-generated-default_command/)

* Go

  [`tmux.DisplayPopupRequest.Command`](https://libtmux.org/en/go/latest/reference/tmux-displaypopuprequest-command/), [`tmux.GlobalSessionScope.SetDefaultCommand`](https://libtmux.org/en/go/latest/reference/tmux-globalsessionscope-setdefaultcommand/), [`tmux.Session.SetDefaultCommand`](https://libtmux.org/en/go/latest/reference/tmux-session-setdefaultcommand/), [`tmux.SessionOptionValues.DefaultCommand`](https://libtmux.org/en/go/latest/reference/tmux-sessionoptionvalues-defaultcommand/)

* Java

  [`io.github.libtmux.PaneStart.Shell`](https://libtmux.org/en/java/latest/reference/io-github-libtmux-panestart-panestart-shell-x755/)
