Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal (shell) not responding

When I open terminal.app and enter a command, I am not getting a response. The cursor return to the next line, but it appears that the terminal window is not processing the command. Any thoughts on how to address this issue?


Thanks in advance!

MacBook Pro, Mac OS X (10.6.5)

Posted on Jun 21, 2011 4:38 PM

Reply
21 replies

Jun 23, 2011 5:49 AM in response to steveeg

> I cant seem to find these files using spotlight. Do they typically live in a folder? Other ways of locating them?


If you are really replying to me and my suggest that you look at the shell initialization files .bash_profile, .bash_login, .profile, and/or .bashrc, then Spotlight is not going to find them, and neither is the Finder as they are "Hidden" files. Any file beginning with a dot (period) is not normally displayed.


Normally you would use the Terminal with the 'ls -a' command to see these files, HOWEVER, Linc and I are well aware that it is getting a working Terminal session that you are trying to do :-)


Try this Linc suggested trick.


Applications -> TextEdit

File -> Open

Shift-Command-Period

... if you are not in your home folder, navigate to your home folder

... see if you have any of the following files

.bash_profile

.bash_login

.profile

.bashrc


Note, you may not have any of the above files, and they do not exist by default, but since you are having problems getting a working Terminal session, and the behavior does not change when you use iTerm, that strongly suggests it is something that initializes your shell.


If you do have any of these files, open them, and look at the contents. It is possible something is being run that is affecting your Terminal session.


Another diagnostic trick would be starting Applications -> Utilities -> Activity Monitor. Set the "process" pop-up button on the right to "All Processes, Hierarchically". Now find "Terminal", then click on the triangle to expose processes that are running under Terminal. Keep clicking the triangles under Terminal until you see all the processes that are running under Terminal. Chances are if something is running that is affecting your Terminal session you will see it. While this will not cure your problem, it might help identify what the problem is.


Terminal

login

bash

... is there something at this level? ...

Jun 23, 2011 10:04 AM in response to BobHarris

Thanks Bob, very helpful.


I was able to find the .profile file. Contents below..


export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

# MacPorts Installer addition on 2010-06-06_at_13:56:07: adding an appropriate PATH variable for use with MacPorts.

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

# Finished adapting your PATH environment variable for use with MacPorts.

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"


source ~/.profile

echo $PATH

PATH


mate ~/.profile

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"




# Setting PATH for Python 2.7

# The orginal version is saved in .profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"

export PATH


Do we delete this file?


I was also able to view Terminal in the Activity Window. There are no 'child' processes under Terminal in the window. To be honest, I havent spent a ton of time in the Activity Window so not sure what to look for exactly.


Thanks again

Jun 23, 2011 10:13 AM in response to steveeg

If you do not need the Python, MySQL, and MacPorts additions, then you can try removing the contents of the file. If you want to be paranoid, you would use use TextEdit -> File -> Save As... so you have a copy of what was originally in the file.


If cleaning out the .profile does not clean things up, then we will have to scratch our heads about what else could cause your problems.

Terminal (shell) not responding

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.