On a new setup, tmux is using bash instead of my default (zsh).

How can I force it to use zsh?

link|improve this question
6  
figured it out. Can set the following in tmux config: set -g default-command /bin/zsh set -g default-shell /bin/zsh – re5et Mar 6 '11 at 5:33
Thank you for posting the solution. This helped me. – Amjith Aug 2 '11 at 4:37
FWIW, you don't need to set default-command if you've set default-shell. – Nicholas Riley Feb 29 at 20:03
feedback

4 Answers

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

in.tmux.conf. Works on Fedora.

link|improve this answer
feedback

Use chsh(1):

chsh -s /bin/zsh $USER
link|improve this answer
1  
i already had this set, but tmux was ignoring it. – re5et Mar 6 '11 at 5:33
feedback

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.

link|improve this answer
Er, is there any indication that re5et (the OP) is on a Mac, or has that wrapper program installed? – Chris Johnsen Feb 1 at 7:13
feedback

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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.