为什么有些Linux系统调用有两个手册页?

时间:2014-12-16 12:08:32

标签: linux man

2 个答案:

答案 0 :(得分:7)

socket(2)提供socket()系统调用的文档; socket(7)描述了如何在Linux上使用套接字(通常)。

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

这个列表在UNIX系统中或多或少(尽管不是很)“通用”,以及大多数时候你感兴趣的部分。 Wikipedia has more documentation on man sections用于各种UNIX系统。

有许多“重复”联机帮助页,例如crontab(1)描述/sbin/crontabcrontab(5)描述crontab文件格式。

如果您未明确添加包含man环境变量的部分,则可以配置MANSECT使用的部分;这在Linux上默认为1 n l 8 3 0 2 5 4 9 6 7

有关每个部分的介绍,请查看man <n> intro(即man 7 intro)。

奖金提示
apropos是你的朋友:

$ apropos crontab
anacrontab (5)       - configuration file for Anacron
crontab (1)          - maintains crontab files for individual users
crontab (1p)         - schedule periodic background work
crontab (5)          - files used to schedule the execution of programs

答案 1 :(得分:1)

手册页大多分为1-8的不同部分。

Man 2用于系统调用。 Man 7用于杂项

 1      User Commands
 2      System Calls
 3      C Library Functions
 4      Devices and Special Files
 5      File Formats and Conventions
 6      Games et. Al.
 7      Miscellanea
 8      System Administration tools and Deamons

下面给出的链接提供了一些信息。

http://en.wikipedia.org/wiki/Man_page

相关问题