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

Cannot use Terminal

When opening Terminal, it just displays nothing. I can edit text, but cannot run commands. Logging out and logging in again did not work.

Possibly a corrupted bash command. Reinstalling Mac OS X 10.6.2 preserving all my files may fix the problem, but the Console appears to contain no errors. This is probably a bug that had been fixed. Here's a screenshot:

User uploaded file

iPod and iTunes-OTHER, Mac OS X (10.6.2)

Posted on Aug 9, 2012 6:51 PM

Reply
6 replies

Dec 5, 2012 10:39 AM in response to Brandon Sky

The issue appears to be that all of your TTY sessions are currently being used, you can run a few commands to see who is using those sessions, although why they are being used can varry.


If you have any open terminal sessions open, you can continue with one by running the command "ls -apl /dev/" this will show you who is using the ttys sessions. As all of my sessions were curerntly being used with the account "administrator". Next I was able to run the command top / or go into activity monitor and you can see there was an abundence amount of sudo commands. In my case it was sudo in yours it could be something different.


As with knowing that this direct error is related to open tty sessions we have to figure out why they are open and how they are stale.



As I was stating as above my example was the administartor account, and running a "ps -ax | grep tty" wasn't showing anythign other then the open tty sessions I had.


Once I was able to kill one of those sudo sessiosn by running top / activity monitor. I was able to open terminal or iTerm and run "ps -ax | grep sudo".


This lead to one of our internal devices that does network access control by remotly logging in via ssh. As you could see this was where all the tty sessions were going. I had my assumptions it was it before, but trying to prove it was another case.


After cleaning up these stale PID's your now open to launch a program that uses a tty session. Hope this helps anyone else that runs into the issue, as the end result a reboot will kill your PID's but if it keeps happening, you need to find out the root cause.

Dec 5, 2012 11:14 AM in response to burton11234

Also in my case after being able to get into terminal and knowing what was the root cause for the issue. I was able to run the command "sudo killall -v -c sudo" as the sudo command was the one hanging my tty sessions, the -v is for verbos.


After I was able to run "ps -ax | grep sudo" and find that either all sessions were killed or some were left open, it took me a few times of running the killall command in order to clean everything up.

Cannot use Terminal

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