It's often said that you learn far more by experimenting with programs than you ever will by reading the manual. Usually this is said by people trying to rationalise their instinctual fear of cracking open a book and reading. As a service to these people we present one single page with the instructions for quitting a great many applications --- because it would be a shame if you spent half an hour `playing' with vi and getting nowhere, and then had to refer to Chapter 4 just to quit.
| What it is | How to quit it |
| your shell | Type exit |
| CTRLD | |
| vi | ESC :WQ! to save and quit |
| ESC :Q! to quit without saving | |
| emacs | CTRLX, CTRLC, which will prompt to save any unsaved files |
| X | Find the Logout option in your GUI's menus |
| CTRLALT BACKSPACE | |
| a stuck application | From a terminal type ps, find its process ID and type kill -9 pid |
| many command-line programs | CTRLC |
| a stuck command-line program | Try CTRLZ; if you get your prompt back proceed as for `stuck application' above |
| Windows | Type CTRLALT DEL and click Log Out |
| a Windows application | CTRLQ |
| a Windows application | ALT F4 |
| MacOS | APPLE SHIFT Q |
| a Macintosh application | APPLE Q |
| a Macintosh dialog | APPLE . |
These were selected to get you out of whatever you're in with a minimum of fuss and confirmation dialogues. Most applications (and vi is famous for it) have more than one way to quit, as described in their manuals -- or so we've heard.