Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I try to get help on a Unix command, I get reference to say tar(1) or lsof(8).

Why is there a number within parenthesis and what does it refer to exactly ?

share|improve this question
    
I am certain this is a duplicate, but I can't find the dup. –  Zoredache Sep 18 '13 at 21:06

2 Answers 2

up vote 20 down vote accepted

The manual is divided into chapters and some topics are actually documented twice, which is often the case when there is a C library function or system call that is also available as a user space command or a config file is available with the same name as the command it documents (example: chown is a user space command and a system call and you find chown in section 1 and 2). The number is then used to select the appropriate chapter:

man 1 ls
  • Section 1: user commands
  • Section 2: system calls
  • Section 3: library functions
  • Section 4: special files
  • Section 5: file formats
  • Section 6: games
  • Section 7: conventions and miscellany
  • Section 8: administration and privileged commands
  • Section L: math library functions
  • Section N: tcl functions
share|improve this answer
1  
Man page section layouts also vary between implementations as well, with the numbering and ordering differing slightly between System V Unix, Solaris, and Linux distros. Some man pages have additional sections depending on if an installed package or program also installs its man pages. –  inetplumber Sep 19 '13 at 1:32

Yep, what SvW said. You can get the full doc from man itself by typing:

$ man 1 man

   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]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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