Mac OS X - Terminal window shows up but closes immediately
I recently had this issue because I uninstalled the version of bash installed by macports (/opt/local/bin/bash) not realizing it was my default shell. The solution was to change my default shell back to /bin/bash via the advanced user options in the Users &amp; Groups System Preferences. (See @sdmeyers' comment on @Pyrolistical's answer for instructions.)