What does the 1 in ls(1) refer to? [duplicate]
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?
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.
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
.