How to use iTerm along with the default bash terminal

bashiterm

I want to use iTerm with my default bash terminal because there is a lot of customization that i have done to my .bash_profile and I don't want to lose it or perform all the hard work again.

Best Answer

You are mixing up a couple of things here. Note there is no such thing as bash terminal.

iTerm and Terminal are applications that start up a defined program - by default it is /usr/bin/login. This program starts a shell (listed in /etc/shells) by default this is /bin/bash.

bash reads ~/.bash_profile if it is started by login (or with a -l parameter), bash does not care if it is started by iTerm or Terminal. (There might be environment variables set depending on what starts bash e.g. ITERM_* from iTerm and TERM_PROGRAM by both)

iTerm and Terminal store their defaults in different places (both within ~/Library/Preferences) and do not write to ~/.bash* files.

Thus your ~/.bash_profile will be run by both iTerm and Terminal and will not be affected by them except if you test on certain variables