I am having slow terminal startup times, in the 2 seconds range BUT only when opening a new Terminal window/tab (both iTerm2 and Terminal).
When launching zsh
from an existing terminal window it launches quickly.
~ % /usr/bin/time zsh -i -c exit
0.01 real 0.00 user 0.00 sys
~ % /usr/bin/time /bin/zsh -i -c exit
0.01 real 0.00 user 0.00 sys
~ % /usr/bin/time /bin/bash -i -c exit
0.00 real 0.00 user 0.00 sys
~ % /usr/bin/time bash -i -c exit
0.01 real 0.00 user 0.00 sys
When opening a new window/tab, the tab title transitions between "login" "env" "bash" then finally "zsh".
I have tried setting the default shell to /bin/zsh
using chsh
and also tried to set the shell in the terminal profile to /bin/zsh
just in case.
There is nothing in my
.zshrc
/etc/zshrc
.bash_profile
.profile
.bashrc
/etc/bashrc
And when setting fish shell as the default shell, new terminal windows start instantaneously.
Do Terminal/iTerm have their own startup scripts?
Am I missing a config file that launches on start up of zsh on MacOS?
EDIT:
Ok when using the --login
flag, it's observably slow
~ % /usr/bin/time zsh --login -i -c exit
2.10 real 0.40 user 0.77 sys
EDIT2:
Changing the shell to Command makes it appear instantly. Where are the config steps for a zsh login shell?