# default-shell

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

> Specify the default shell.

option tmux3.7c

Specify the default shell.

* Scope

  session

* Type

  Text

* Default

  `/bin/sh`

* Set

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

* Read

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

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

Specify the default shell. This is used as the login shell for new windows when the [`default-command`](https://libtmux.org/en/tmux/latest/catalog/options/default-command/) option is set to empty, and must be the full path of the executable. When started `tmux` tries to set a default value from the first suitable of the `SHELL` environment variable, the shell returned by [getpwuid(3)](), or /bin/sh. This option should be configured when `tmux` is used as a login shell.

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

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

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

* Defined in

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

* 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-shell)

## Used by[#](https://libtmux.org/en/tmux/latest/catalog/options/default-shell/#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/), [`tmuxp.workspace.options.PaneReadiness`](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-options-panereadiness/), [`tmuxp.workspace.options.resolve_session_shell`](https://libtmux.org/en/py/latest/workspace/reference/tmuxp-workspace-options-resolve_session_shell/)

* TypeScript

  [`server.Server.showGlobalOptions`](https://libtmux.org/en/ts/latest/reference/server-server-showglobaloptions/)

* Rust

  [`freeze.freeze`](https://libtmux.org/en/rs/latest/workspace/reference/freeze-freeze/), [`options.generated.DEFAULT_SHELL`](https://libtmux.org/en/rs/latest/reference/options-generated-default_shell/)

* Go

  [`tmux.GlobalSessionScope.SetDefaultShell`](https://libtmux.org/en/go/latest/reference/tmux-globalsessionscope-setdefaultshell/), [`tmux.Session.Run`](https://libtmux.org/en/go/latest/reference/tmux-session-run/), [`tmux.Session.SetDefaultShell`](https://libtmux.org/en/go/latest/reference/tmux-session-setdefaultshell/), [`tmux.SessionOptionValues.DefaultShell`](https://libtmux.org/en/go/latest/reference/tmux-sessionoptionvalues-defaultshell/)
