Possible Duplicate:
What do the parentheses and number after a Linux command or C function mean?

I see that many utilities have a number in brackets after their name, for example ls(1) or symlink(7). What are these numbers called, and what do they reference?

link|improve this question
I have always seen this but never cared to ask or find an answer to this. +1 for asking this question. – Jeffrey Jose Dec 29 '10 at 8:09
feedback

closed as exact duplicate by Mokubai, Sathya Sep 3 '11 at 14:29

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

2 Answers

up vote 22 down vote accepted

The numbers refer to the manpage section the manpage belongs to:

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]

(from man man :-) )

The reason for showing the section is mainly that there is often a manpage with the same name in more than one section, e.g. man(1) (the man command), and man(7) (the system of manual pages). Same for e.g. system calls (section 2,3) and commandline programs (section 1) with the same name, e.g. unlink.

BTW, you can use man -a to see man pages from all sections for a given search term.

link|improve this answer
Thanks! I think my man files must be set up wrongly. When I try to find man in section 7, I just get "No entry for man in section 7 of the manual" - and man(1) only describes how to invoke the man executable. – Douglas Oct 4 '10 at 23:30
Well, the set of man pages is not standarized, AFAIK. So maybe your OS / installations just chose a diferent set of man pages... . What OS are you on? – sleske Oct 4 '10 at 23:33
The section numbers vary somewhat between unix variants. 1, 2 and 3 are firmly entrenched, others less so. The list given here is for Linux. Many systems have an intro man page in each section. – Gilles Oct 5 '10 at 21:58
feedback

If you're looking at the man page when you see these, they are the "section" in which to look. By default, man pulls up the first entry it finds for a given query. However, this can cause issues where you have an entry for crontab, the command, and crontab, the system file (the command is used to edit the file). By specifying the section you want, you can tell man which you're looking for. man man should give you a listing of the sections, and you can select one with man <section> <query>, such as man 1 ls.

link|improve this answer
feedback

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