Mac OS X is a great operating system. It’s stable but it isn’t perfect. Once in a while, the application you are working on may freeze (or hang). If your application is not responding or you encounter the Spinning Beach Ball of Death, chances are your application has crashed.
Upon typing in
ps -ax, you may get a long list of output of running processes that look something like the screenshot below:
Force quit with keyboard shortcuts
ps -ax | grep Chrome
and it should output the following in Terminal:
- Press and hold the following keys: Command + Option + Esc
- Choose the application you want to quit in the "Force Quick Application" dialogue box.
- Click "Force Quit".
Force quit via Terminal
If you don’t want to wait it out, here are two ways how you can force quit an application that’s not responding.
- Launch Spotlight Search with Command + Spacebar and search for Terminal. Hit Enter.
- In Terminal, type
ps -axthen Enter. This will give you a list of all running process on your Mac along with other details like its respective PID number, elapsed running time, process name and process location.
- To kill (force quit) a specific application, look for its name and note down the PID number.
- Type the following command in Terminal:
kill <PID number>
ps -ax | grep <application_name>
and in our case, it will be something like this:
The full command would look like this:
Alternatively, you can quit an application using shell command via Terminal.
Here’s an example:
Go ahead and type in the following command in Terminal:
This will terminate Google Chrome browser instantly. Hope this tutorial helps!
Note that the PID number for Google Chrome is 9635.
Now, let’s say we want to force quit Google Chrome, we can make use of the
grep command in conjunction with our
ps -ax to get exactly the information about the process we want.
If your application is not responding, do the following: