Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-07-2007, 05:27 PM   #1
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Rep: Reputation: 41
how to exit/quit man?

I'm not sure how to quit man. It seems like ":q" works... is that the way to do it?

where do I learn about the man "runtime" commands? "man man" doesn't discuss them.
Old 11-07-2007, 05:31 PM   #2
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
man uses a program called "less" to display the contents of the manpages. Thus, all commands for less are essentially commands for man. Useful ones are "/" which will allow you to search for words (scroll through the results with "n" and "N"), and "q", which allows you to exit the man page.

(run each of the commands above (/nNq) without the quotes! )

Last edited by pwc101; 11-07-2007 at 05:32 PM. Reason: added clarification
Old 11-07-2007, 05:35 PM   #3
Senior Member
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
That question sure takes me back.
Old 11-07-2007, 05:40 PM   #4
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
The man program typically uses the less pager program to view it's output. You can read the less manual page to discover the keys, or simply press h when viewing something in less to get quick help.

I said typically, because man actually checks the value of the environment variable PAGER, and if it is set, uses that as the program to view pages. A simpler, and older pager is called more which has rather minimal functionality. I don't recommend using it instead of less because it is not as useful, but just as an example of how to set a different pager program, you might do this:
export PAGER=more
man ls
...and that will use more to page through the file. It happens that q also quits from more. The name less is a play on the name more. It might not look like much, by less is really quite a nice program. Browse the help and discover some nice features.
Old 11-07-2007, 05:49 PM   #5
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 41
Thanks. Every little thing I learn helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
exit a man page? gnuoob Linux - Newbie 2 08-27-2005 01:39 PM
man pages: how to exit? KlaymenDK Linux - Newbie 2 06-25-2004 08:03 AM
How to quit man (less) and keep man info on screen? peb Linux - Newbie 7 03-25-2004 10:02 PM
Exit man (elegantly) verstapp Linux - Newbie 2 03-01-2004 07:29 PM
Exit man, switch processes Bellrang Linux - Newbie 4 04-03-2003 10:15 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration