Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

man pages often look like a wall of text when you open them, with huge amounts of options and often not much context. But they are a great mine of information for how to use the commands.

So how do you go about making sense of man pages? What are the standard sections about? How are they organised? Is there a mental map that makes it easier to make sense of man?

Are there any tips you use to make them easier to navigate - eg adding colour to the text.

share|improve this question
    
In addition to this page also see the man info page. –  Zoredache Aug 12 '10 at 18:25
add comment

4 Answers

If you are using konqueror then man pages can be browsed in the browser itself. Just put man:/command_name to view man page

e.g. man:/ls

Alternatively there's vim plugin available to view man pages with syntax highlighting in vim http://vim.wikia.com/wiki/View_man_pages_in_Vim

share|improve this answer
add comment

The Description and Examples sections of man man are a great help in understanding how man pages are organized and how to use them.

In general, I find the Examples, See Also and Files sections of many man pages to be very useful since they give clues where to look next when you're trying to track down something that may be obscure.

If your pager is less you can set the LESS_TERMCAP_* variables to show color in man pages. Here are mine:

export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
export LESS_TERMCAP_me=$(tput sgr0)
export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) # yellow on blue
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
export LESS_TERMCAP_mr=$(tput rev)
export LESS_TERMCAP_mh=$(tput dim)
export LESS_TERMCAP_ZN=$(tput ssubm)
export LESS_TERMCAP_ZV=$(tput rsubm)
export LESS_TERMCAP_ZO=$(tput ssupm)
export LESS_TERMCAP_ZW=$(tput rsupm)

Don't forget that the info files often have more detail and are navigable (have a form of hyperlink).

share|improve this answer
    
+1 for "man man". For some reason, I never thought to invoke that when I was first learning my way around SunOS. –  Skyhawk Aug 12 '10 at 16:37
add comment

I don't view man pages as a source for primary learning. I view man pages as a useful trigger for reminding me how to do something I already know how to do.

Usually you can find tutorials or how-tos on the internet which teach how and why things go together the way they do. Then when you come to actually do it, you read the man pages to remind yourself of the particular flag or syntax of how to get it done. My personal rule of thumb is that if I can't figure out what I need to do in two passes of the man page, I need Google... and probably to create some notes for myself.

Usually I find that less is the best man page viewer for me; I can scroll up and down and do searches in it to find the words I am looking for.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.