Change tmux default to zsh

From man tmux:

default-shell path
Specify the default shell. This is used as the login shell for new windows when the 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.

So, in your tmux.conf:

# set shell
set -g default-shell /bin/zsh

and if you want you can add default command each time, when we start a new window:

# Retach userspaces
set -g default-command "reattach-to-user-namespace -l zsh"

Leave a Comment