Zsh is better than bash(obviously), but for some reason, from time to time I have to use bash. I am wondering is there any way for me to use them together without changeing them manually?

What I have in mind is putting them in seperate tabs, I have tried it actually. Using zsh as default, and open another tab using different profile opening bash, though this can work, but all the configurations for bash didn't work.

So can anyone help me out here, thanks!

1 Answer 1


If by “all the configurations for bash didn’t work” you mean that customizations made in ~/.bash_profile (or ~/.profile or ~/.login) aren’t taking effect, that’s because bash is being invoked as a non-login shell (it runs ~/.bashrc instead).

To make it a login shell, the simplest solution is to add the -l option:

bash -l

Alternatively, if you want to actually create a login session you can invoke it via the login command. This creates a new login session (as displayed by the who command) and it invokes bash with the name -bash (as displayed by ps) to indicate it’s a login shell (same effect as the -l option):

login -f username bash
  • -l option really helps!
    – Sean
    Commented Mar 12, 2012 at 6:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .