MacOS – Mac OS X – Terminal window shows up but closes immediately

macmacos

I'm using Mac OS X Lion 10.7. I open Terminal and its window shows up but immediately close and its icon remains in the dock. It's working fine a moment ago. I don't know what i have messed. I looked at the log file in the Console application and see "login: USER_PROCESS 172 ttys000"

Best Answer

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 & Groups System Preferences. (See @sdmeyers' comment on @Pyrolistical's answer for instructions.)