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.
-
What makes you believe that using a different SSH client will somehow override your bash_profile?– AllanJul 9, 2016 at 12:40
-
i thought iterm might have its own shell and installing it might not replace the original one– Ajay SinghJul 9, 2016 at 13:07
-
The shell is on the server, not the client. The interior of a room doesn't change when you look through a different window.– AllanJul 9, 2016 at 13:09
1 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
-
what if i want to use different bash_profiles/ vimrc for terminal and iTerm? Jul 9, 2016 at 13:08
-