Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using iTerm2 in Mavericks OSX and made sure I updated to the latest version. My working directory inside preferences is set to Home Directory.

I was watching a tutorial on iTerm customization and this author I was listening to managed to have this scripts run automatically every time he just saves (":wq") out of Vim editor.

I am new to the Mac so I literally wasted a few hours trying to figure why my iTerm wasn't updating its color. It turns out I have to type "source .bash_profile" also.

From the video, the author taught how to download and install iTerm, typed "sudo vim .bash_profile" and pasted a script. I am sure there were not changes to the preferences other than the default. Did I miss something?

Thank you

share|improve this question
After updating .bash_profile, did you open a new tab or new window of your terminal? Otherwise you have to source .bash_profile. Btw, using sudo for vim .bash_profile is really weird, so I would question everything else the author says. – janos Dec 30 '13 at 7:10
Link to video, please? – romainl Dec 30 '13 at 9:20
Like Janos said, using sudo to edit .bash_profile is odd, since .bash_profile is meant to be owned by the user (you), and su/sudo are used to do stuff as a different user. Sounds tacky, indeed. And on that matter, the only stuff you really need to do inside .bash_profile while using iTerm2 is stuff like path variables, PS1, sourcing and stuff. Changing stuff like, you said, background color would be easiest to do via iTerm2's own preferences. – krystah Dec 30 '13 at 14:10

The only other way to get the changes in your profile to be applied is to restart your terminal. This is because it is a script set to run at login. bash .bash_profile or exec ~/.bash_profile will not work as these commands will open a new bash process.

share|improve this answer

You must log in to answer this question.

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