Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've found the Ubuntu Manuals site (http://manpages.ubuntu.com) very useful for looking up manpages when I'm not at a computer with Ubuntu on it. However, I've found that sometimes the search results table links to multiple manpages with the same name.

For example, performing this search for grep results in two links for each distribution, both labeled grep(1): one to grep.1posix.html and one to grep.1.html.

I've heard of Ubuntu being "POSIX-compliant", so how do I know which manpage will be most applicable to a typical Ubuntu install? (Or, how do I know which manpage shows up when I use the man command?)

share|improve this question

1 Answer 1

up vote 4 down vote accepted

As the man manual page says:

A section, if provided, will direct man to look only in that section of the manual.
The default action is to search in all of the available sections, following a 
pre-defined order and to show only the first  page  found,  even  if
page exists in several sections.

In the config file /etc/manpath.config you find the actual order used:

1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7

Also, man -a $command will show all pages found in all sections, and -S $section-list option override default order.

A last note: you probably will find man 1posix grep will not work on your system, because the package manpages-posix is not installed by default.

share|improve this answer

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.