Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make iTerm2 launch with Zsh

Tags:

zsh

iterm2

I've been digging through iTerm2's settings but I can't seem to find a way to make it launch Zsh instead of Bash, does anybody know the proper way to do this inside iTerm2?

I ask this because I come from Mac Terminal, and it easily lets you choose what to run at startup, but I can't seem to find something straight forward with iTerm2.

I searched Google for it, but for some reason I can only find oh-my-zsh references, nothing related to un-modded iTerm2.

I appreciate any help you can provide, thanks. :)

like image 560
greduan Avatar asked Nov 20 '12 15:11

greduan


3 Answers

Change your default shell to /bin/zsh by running the chsh -s /bin/zsh command.

like image 146
Adam Batkin Avatar answered Nov 12 '22 01:11

Adam Batkin


Although the change with chsh -s $(which zsh) worked perfectly for me, my iTerm2 wouldn't automatically open new terminals with zsh.

Instead I went to iTerm2 -> Preferences -> Profiles -> Default and in the General Tab set the Command to /usr/local/bin/zsh instead of Login shell.

Update: With the current version of iTerm (as of 2.1.1) it perfectly worked for me by changing the default shell (shown above) only.

like image 39
Thomas Fankhauser Avatar answered Nov 12 '22 00:11

Thomas Fankhauser


The following also worked for me:

Preferences -> Profiles -> General Tab -> Command -> Choose "Custom Shell" -> write "zsh"

Restart iTerm2.

I still keep bash for Terminal as the default shell.

like image 7
T_T Avatar answered Nov 12 '22 00:11

T_T