[Gllug] command(number)

Joel Bernstein joel at fysh.org
Wed Mar 12 16:33:57 UTC 2008


On Wed, Mar 12, 2008 at 04:23:05PM +0000, Avi Greenbury wrote:
> Most likely a stupid question, but I've seen quite a few people refer to commands as <command>(<number>), like mount(8) or su(1)
> 
> What does it mean?

It's the section number for the manual. They have the following major
categories:

       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 conven‐
           tions), e.g. man(7), groff(7)
       8   System administration commands (usually only for root)
       9   Kernel routines [Non standard]

and the 'man' command will search through those categories (and any
subsets) according to a predefined and configurable order.

A particular case where this is handy to know is in section 3, where
multiple programming languages might have a function named 'exit' (for
example). The section 3 pages are likely organised into sub-sections.
Thus a search for 'exit' (i.e. 'man exit') would return exit(3), as
would 'man 3 exit', whereas 'man 3tcl exit' returns the exit() function
documentation from the TCL language, and 'man 2 exit' documents the
_exit() system call.

/joel
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list