Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Possible Duplicate:
What do the numbers in a man page mean?

If I typeman ls, I seeLS(1) in the top left and top right corners of the manpage.

I also see programs on the internet being refered to this way.

ex. man(1), xman(1x), apropos(1), makewhatis(8) and catman(8).

What are these numbers (and in some cases letters)?

share|improve this question
    
The original Unix manuals came in several binders, numbered 1 for user commands, 2 for system calls, 3 for library functions, 4 for "special files" (devices), 5 for file formats, 6 for games (extremely important! we all know this is the reason for the machine, all the rest is just disguise ;-), 7 for conventions and such. To this they added folder n for new (experimental stuff), and some installations had a l folder for local stuff. For more details on section S do man S intro. –  vonbrand Feb 4 '13 at 18:12
    
An important thing to note about this is that there may be multiple man pages with the same name in different sections, but you cannot tell that by just asking for man whatever. –  TAFKA 'goldilocks' Feb 4 '13 at 19:53
add comment

marked as duplicate by manatwork, Renan, uther, Stephane Chazelas, jasonwryan Feb 4 '13 at 19:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 2 down vote accepted

It's the section number, see

man man

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.

    The table below shows the section numbers of the manual followed by the types of pages they contain.


    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]

By example, stat have 3 sections :

$ man -k stat | grep "^stat "
stat (1)             - display file or file system status
stat (2)             - get file status
stat (3p)            - get file status

So if you type

man 1 stat

it's not the same as

man 2 stat
share|improve this answer
    
SysV derived unixen (Solaris for example) have slightly different numbering, see en.wikipedia.org/wiki/Man_page#Manual_sections –  mr.spuratic Feb 4 '13 at 17:45
    
Every Unix has different sections, regardless of heritage. –  schaiba Feb 4 '13 at 17:54
add comment

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