大多数 bash 命令都有帮助手册,可以在命令行中使用以下命令打开man
:
man bash
man ssh_config
man sshd
在每个命令手册页的第一行,我们可以看到命令的名称后面紧跟着括号内的数字:
bash(1)
ssh_config(5)
sshd(8)
这个数字是什么意思?你们当中有人知道一个页面,其中列出了这些括号之间可能出现的所有数字的可能值及其含义吗?
答案1
手册页的章节
本页描述了为 Linux man-pages 项目编写手册页时应采用的约定,该项目记录了 Linux 内核和 GNU C 库提供的用户空间 API。因此,该项目提供了第 2 节中的大部分页面,以及 Linux 系统手册页第 3、4、5 和 7 节中出现的许多页面。本页中描述的约定对于为其他项目编写手册页的作者也可能有用。
手册页的章节手册的章节传统定义如下:
1 User commands (Programs) Those commands that can be executed by the user from within a shell. 2 System calls Those functions which wrap operations performed by the kernel. 3 Library calls All library functions excluding the system call wrappers (Most of the libc functions). 4 Special files (devices) Files found in /dev which allow to access to devices through the kernel. 5 File formats and configuration files Describes various human-readable file formats and configuration files. 6 Games Games and funny little programs available on the system. 7 Overview, conventions, and miscellaneous Overviews or descriptions of various topics, conventions and protocols, character set standards, the standard filesystem layout, and miscellaneous other things. 8 System management commands Commands like mount(8), many of which only root can execute.
请参阅 man man 了解详情 =)