Switcher Tips: Quit an Application

« Previous article.
Next article. »


By: switchtoamac at: 7:00 AM on July 10, 2006 | Comments (4)
buttonsOne of the first things that a Windows convert needs to learn about quitting an application in OS X is that a simple close of an application window does not actually quit the application. In the default Blue OS X theme, windows have red, yellow, and green droplet-like buttons in the upper-left corner.

Windows users are used to clicking the red X in the upper right button in Microsoft Windows to quit an application.  In OS X however, clicking the left red button does not actually quit an application, it just closes the window for that application.  The application (process(es), memory, and resources tied to that application) continue to run in the background despite you not seeing the application in front of you.  You can always verify that an application is running by looking to see if a black arrow exists underneath the application icon in the OS X Dock or by running "top" in Terminal (located at /Applications/Utilities).

There are numerous ways to quit a running application in OS X.  You can gracefully quit (close) or "force quit" an application.  In most cases, you'll perform a graceful quit.  Force quit is used when an application becomes unresponsive, hangs, or freezes.  Just note that "force quit" is a volatile operation, any unsaved changes in that application will be lost.  Unlike Windows where an frozen or unresponsive application often leads to a unstable system which is generally resolved by a restart, force quitting in Mac OS X allows you to re-launch the application without having to sit around waiting for your system to reboot.  The benefit is that you'll be able to continue your work as other applications will not be impacted (most of the time).

Ways to quit an application

  1. Menu Bar -> Quit
  2. Command-Q (equivalent to Alt-F4 on Windows)
  3. Hold down Command and then Tab through open applications. Highlight an application then hit Q to quit it.  This is a variant of Command-Q
  4. Control-click or click and hold the application icon in the Dock.  Then click "Quit" in the popup menu

  5. Force Quit
    1. Option-Control-click the application icon in the Dock

    2. Command-Option-Escape. This option will bring up a window listing all running applications.  You can then select a specific application and then click "Force Quit" in the lower right.

      Note: You cannot quit Finder so the only option is re-launch when Finder is selected in the Command-Option-Escape window.
  6. Open Terminal.  Find the process ID of the application.  Then type "kill -9 PROCESS_ID" (plug in the actual process ID number for PROCESS_ID).


4 Reader Comments

1. Not all applications on the Mac follow this model. Some will quit when you close the window, some will not. Take system preference as an example - it will quit when you close it with the red button. As a general rule, document-centric applications, or ones which may have multiple windows for whatever purpose, remain open. SIngle window applications will quit. As a rule of thumb, look at your menu bar when you close that window and see if the application title changes. Note that if you are not IN the application whose window you closed, you cannot tell if it quit or not, because the 3 buttons in the upper left of a window respond whether or not the application is the current focus.

2. "The application (process(es), memory, and resources tied to that application) continue to run in the background despite you not seeing the application in front of you."
Well, some part of it continues to run. For the most part, for a well behaved application, if no documents are open little if any memory or CPU cycles are consumed, and you are safe to leave the application open as long as you want. That is why the behavior is like this to begin with - why need to relaunch the application each time, if it can comfortably "hibernate" without consuming much of your resources. As a general rule, do not worry about quitting programs. They will quit when you shutdown or restart.

3. "Unlike Windows where an frozen or unresponsive application often leads to a unstable system which is generally resolved by a restart"
I don't know what version of Windows you are referring to, but force quitting a task under Windows XP, for the most part, is about as volatile to your system as it is on the Mac. Believe me, I am NO Windows fanboy, but force quitting applications on either platform has pretty much the same stability quotients.

4. You missed another way of force quitting applications - use the Activity Monitor, where you can actually monitor what files an application may have open before you force quit it. You can quit or force quit processes from here, and it is much more approachable to the technophobe then starting up terminal (and you may find some useful gems in there for you). Since this is a post for "switchers", it is most like a sup-ed up Task Manager...

Is there any way to set OS X to quit an application when the last window of the applications is closed? Perhaps there are some terminal commands that could set this? Perhaps 10.5 Leopard will allow this. Why not let the user had the ability to customize this 'Windowsism'...

I have to admit, this has always been one of the Mac's biggest shortcomings. You can read entire web pages on why the Mac considers the application different from the windows in the application. However, to the user, a document is a document, and closing the last open document should close the application.

IMHO the Windows process is much better, less modal. The user has documents open in windows, the individual applications don't matter, and shouldn't to the user. It's especially irritating that the Mac does this differently with different 'types' of applications. That right there should tell Apple something.

Oh and yea, having an application lock up the OS in Windows hasn't been a problem since the Windows NT kernel was released. It's a shame Mac users still have that old belief rattling around.

To kill an app via the command line you can also use:

killall Safari

Speak your mind - Leave a Comment