Actually this is my (late) response for my friend yalmove. Sorry friend.
To find out what process running in the memory/ computer through console mode is using ps x command.
Let say you use ubuntu, type this command in your console
#sudo ps x
Then you will see lots of processes running. The number in the left side is an unique number for an application. That number that we will use to shut off the application when it hang.
This is how to shut off the application in console, let’s say you have open office writer running , the ps x command will result something like this
4223 ? R+ 1:00 /opt/openoffice.org3/program/swriter
Kill it by typing this command
#sudo kill 4223
Then the application will close.