Search code examples
linuxposixsystem-callsfreebsdmanpage

What do the numbers after command and system call names mean in *nix?


I often see number-suffixed command or system call names in man pages or other documentation, for example, splice(2). Although, some publications don't include the numbers, for example, Splice on Wikipedia.

I never found an explanation of what the numbers stand for and don't even know where/how to begin a search.

  1. What do these numbers mean?
  2. What is the range for these numbers?
  3. Why are they suffixed to function and command names?
  4. Which communities use those numbers?

Solution

  • These numbers refer to Unix man sections.

    1   Commands available to users
    2   Unix and C system calls
    3   C library routines for C programs
    4   Special file names
    5   File formats and conventions for files used by Unix
    6   Games
    7   Word processing packages
    8   System administration commands and procedures
    

    You can specify a section number with the man command by just listing the section number:

    man 1 somecommand  
    

    would look for somecommand in section 1 of the man pages.

    Wikipedia has some additional information on this as does this page on how to use man pages.