The “man” command is short for manual, and with it you can summon detailed manual page and information on nearly any other command or command line utility that is available, including using an extensive man document search to find related manual pages. While man pages are frequently used and referenced, many users don’t know how to properly exit our quit out of the man command. That may sound a little silly or newbie-ish, but even longtime unix users may not know how to quit out of man (let alone quitting VIM for that matter – both are more common than you’d think).
We get this question often, and not to worry; exiting the man command is extremely easy and it’s universal, meaning you can quit man the same on any unix OS that includes the feature, whether that is Mac OS, Mac OS X, linux, BSD, or otherwise.
The Trick to Exiting man Command: q
Just press “q” key to quit out of a man page. Yes it is that easy, simply pressing “q” will exit out of the man command properly.
This should be easy for Mac users to remember because the Command + Q keyboard shortcut quits an application, so it’s already fairly similar – just drop the Command key and press “Q” alone and you will quit out of any open man page.
If you want to try this out yourself, go ahead and launch the Terminal application and then open any man page by typing “man (command)” for example “man ipconfig” (you can quick launch man pages through the Terminal Help menu by the way, or right-click on a command and launch one from there).
Of course what not to do is the button mash: a common theme is for many command line users to mash Control+C, Control+Z or Control+X to try and suspend or exit MAN, I have seen this many times (and ages ago when first exploring the command line did the same thing myself) but all that will do is suspend man which then must be terminated separately. That’s not the right approach, and it’s actually harder than just pressing “q” anyway – so if you have that habit, try to remember to just press ‘q’ instead, it’s a lot easier.
Do you know of any other tricks or easy ways to remember exiting manual pages or to better work with man command? Let us know in the comments.