Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 was following a tutorial for configuring OS X Mountain Lion and somehow after editing the bash_profile I can't run the terminal properly.

The terminal starts just fine but is blank, if a wait long enough there's a "[Process complete]" that appears but that's all, I cannot run any command although I can still write.

When I look at the Inspector I see that the process 'login' worked fine but for 'bash' it's another matter – its ID keeps going up with 'ruby'.

This is the tutorial I was following.

What I added to the .bash_profile before the problem showed up is:

export ARCHFLAGS="-arch x86_64"
export PATH=/usr/local/share/python:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
test -f ~/.bashrc && source ~/.bashrc
share|improve this question
As the author of the linked article, I'm sorry to hear about the trouble the OP experienced. That said, I don't have any reason to suspect the steps in the tutorial as a probable cause of the described behavior. I've run those steps on fresh instances of Mountain Lion without any problems, as have many others following that tutorial. Regarding slhck's comment on changing the PATH... There are times when it is useful to utilize the homebrew-dupes repository, which is why Homebrew binaries take precedence on my systems. – user237529 Jul 11 '13 at 23:44
up vote 6 down vote accepted

In your preferences, simply change your profile to run /bin/zsh by default (or any other shell you like except for Bash). Deactivate Run inside shell.

Now, start a new terminal window and remove your ~/.bash_profile:

rm ~/.bash_profile

Remove anything else you don't want, or change it with vim if you like. You can of course run the rm command right away from the Terminal startup.

You can start fresh from here. You don't need to source ~/.bashrc – you might never need this file on OS X anyway, as a new Terminal window runs a login shell and therefore sources .bash_profile.

You also don't need to have Homebrew binaries take precedence over system ones by changing your path. Homebrew has a strict policy of not supplying any duplicates of OS X software, so if you install – for example – GNU coreutils, you'll get gfind instead of find, etc.

share|improve this answer
I did change du the profile to run like in your screenshot, but when i start a new terminal window it's quite the same, i can type like it's a text editor and in the inspector the processes bash and ruby are going wild (their ID is going up up and up). So i cannot even remove the bash_profile with a command. – bash_profile blank Jul 11 '13 at 9:23
Can you run rm .bash_profile directly as a startup command? – slhck Jul 11 '13 at 9:26
What do you mean as a startup command ? When a ask for a new window i cannot do a thing, and when i type the command with "new command" it's printing : -rm: ~/.bash_profile: No such file or directory [Process completed] – bash_profile blank Jul 11 '13 at 9:29
I meant setting rm /Users/your-username/.bash_profile in the Run command field in your Terminal's preferences, instead of /bin/zsh. – slhck Jul 11 '13 at 9:32
same output : -rm: ~/.bash_profile: No such file or directory [Process completed] – bash_profile blank Jul 11 '13 at 9:37

Open up a text editor (I tried with Atom).

Save a blank text file as .bash_profile into your home directory.

Choose to Use "." when Mac alerts you that names that begin with "." are reserved for the system. Replace the old .bash_profile.

share|improve this answer
Saved me a world of hurt. Thank you! – Joe Oct 23 '15 at 21:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.