How can I make tmux use my default shell?

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

in ~/.tmux.conf or /etc/tmux.conf. Works on Fedora.

You can reload the config with <leader>: source-file <conf file> e.g.

<C-b>: source-file ~/.tmux.conf

You would need to do it for every tmux instance. Otherwise you may restart tmux with killall tmux; tmux


First ensure your default shell is set properly to zsh via running this in your command line:

chsh -s $(`which zsh`) $USER

Placing the folloowing in your ~/.tmux.conf is a more robust option for any shell.

set-option -g default-shell $SHELL

Drop this line in the bottom of your ~/.tmux.conf

set-option -g default-command "reattach-to-user-namespace -l zsh"

After you add that, kill and restart your tmux server and all should work.

Tags:

Shell

Zsh

Tmux