Terminal console hanging in Lion

Joined
Oct 19, 2011
Messages
13
Reaction score
0
Points
1
I usually just use Terminal to connect to and map shared drives on my office network. I'm not sure what I've done recently, but now whenever I open Terminal, the console just hangs and eventually the entire system locks up.

There's no $ prompt which is what I usually see when I open Terminal.

I can eventually use Force Quit to shut it down, but other programs will run extremely slowly or hang until I restart.

I've tried deleting the plist entry in Library, but that hasn't worked. I've downloaded iTerm and the same thing happens with that.

I've had Activity Monitor open before I've opened Terminal, but there's no spike in CPU usage - it just registers as not responding.

Any ideas?

Thanks.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
did you make any changes to a .profile etc recently?
 
OP
G
Joined
Oct 19, 2011
Messages
13
Reaction score
0
Points
1
Not intentionally - I'm a newbie and I don't know how to do anything in Terminal that I haven't been given clear instructions for ;)

The only other thing I can think of that I have used Terminal for is to show hidden files (I wanted to find a .htaccess I'd created).

The lines I used were:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Well, that won't do it.

When terminal is 'hung' what happens if you hit ctrl-c ?

Do you get a prompt?

If you do, do a ls -al and show anything that's prefaced with a .

We'll go from there.
 
OP
G
Joined
Oct 19, 2011
Messages
13
Reaction score
0
Points
1
actually I don't get anything happening.

^C came up on the console, and I hit return.
I tried ls -al and return, and nothing happened.

Then everything started locking up again.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Hrm, ok.. so we can't break whatever process is trying to load. Let's try this...


create a new user, see if the same thing happens in Terminal. If it doesn't it's something about this user.. Then we can start checking the usual culprits.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I was going to suggest that this may be a setting with Terminal but if you're experiencing the same issue with iTerm, it's clear that this is an issue with Bash.

Move your .bash_profile out of your home directory (or rename it), quit Terminal and restart it. Does that work?
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Yea, that's where I was going. Basically if another user worked.. it's an easy sudo mv /Users/<uname>/.bash_profile /Users/<uname>/bash_profile.foo

But you know me and the gui ;) I'm not sure how to show hidden files without the CLI method.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I figure since hidden files were now shown in Finder (as post #3 would suggest), a quick rename/move could be done. I could be wrong though (it doesn't happen much :p).
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
I figure since hidden files were now shown in Finder (as post #3 would suggest), a quick rename/move could be done. I could be wrong though (it doesn't happen much :p).

GAH! You, sir, are absolutely correct ;D

I hate it when I do that.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
OP
G
Joined
Oct 19, 2011
Messages
13
Reaction score
0
Points
1
Actually guys, hidden files aren't shown! Although I ran that line of code, something didn't work out right, so I still can't see hidden files :(
Any idea of how I can get to my bash profile without making that change through Terminal?

The problem is with my work mac, so I'll try the new user thing on Monday now I'm less busy, but if there's a way to get to the bash profile I'll do that first.
Thanks again for your help, guys.
 
OP
G
Joined
Oct 19, 2011
Messages
13
Reaction score
0
Points
1
Ok, so I tried moving the bash_profile, but it didn't work :( Nothing happened. Everything locked up again.

I also created a new user and opened terminal in that account and it was working fine, so I think your diagnosis is correct! How do I fix it?
 
OP
G
Joined
Oct 19, 2011
Messages
13
Reaction score
0
Points
1
Here's what I get when I try to move the bash_profile in my normal account. Forgot to change <uname> in the first instance ;)

Screen Shot 2011-10-24 at 9.25.36 AM.png
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Is this logged in as the new user, or the old one?
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Use the new user, same exact command.
 
OP
G
Joined
Oct 19, 2011
Messages
13
Reaction score
0
Points
1
! I didn't realise you could move another user's files! I'll try it now.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
You can't ;) a superuser can! (hence the sudo ) :)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top