Linux man page why to use number ?

JRPrakash used Ask the Experts™
Hi, I happen to use the man command in the following way
# man 3 pthread_init.

How can i find out pthread_init man page can be retrieved only mentioning by number 3 ?.. I end up tring from 1 to 3 .

What does this number means ?? Can someone provide be bit explanation about it ?.  
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2009
That number describes the section the man page is in (or in other words, what kind of subject the man page is about). From my man page for man (man man) :

       1   Executable programs or shell commands
       2   System calls (functions provided by the kernel)
       3   Library calls (functions within program libraries)
       4   Special files (usually found in /dev)
       5   File formats and conventions eg /etc/passwd
       6   Games
       7   Miscellaneous  (including  macro  packages and conventions), e.g. man(7), groff(7)
       8   System administration commands (usually only for root)
       9   Kernel routines [Non standard]

Sometimes it's necessary to specify, since the same name might refer to both a shell command and a library call eg.
Guess the actual question is already answered, here is some more info that might be useful.

Read "man man".. :-)

man -a pthread_init # opens all pages with pthread_init title.
man -k pthread_init # lists all pages matching keyword pthread_init
man 3 pthread_init  # open pthread_init(3)

Open in new window

So usually you should do:
man -k keyword
then pick the correct section/page number and run
man <section/page number> keyword
only way you can list out 1-3 man pages is try one by one

#man 1 pthread_init
#man 2 pthread_init
#man 3 pthread_init

if you are not finding it, try
#man -k '^pthread'
Top Expert 2009

>> So usually you should do:

Or if you know what you're looking for, simply use the correct section. So, for example if you know you want info on the library call pthread_init, you know it's gonna be in section 3. If you want info on the shell command ls, you know it'll be in section 1. Etc.

only way you can list out 1-3 man pages is try one by one

      man -a pthread_init

will open all 3

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial