man
man是manual命令的简写,上学时学过为手动的用手的意思,这是名词为说明书的意思
man man # 使用这个命令可以查看man的使用方法
以下为man的描述
DESCRIPTION
man is the system’s manual pager. Each page argument given to man is normally the name of a program, utility or function.
The manual page associated with each of these arguments is then found and displayed.
A section, if provided, will direct man to look only in that section of the manual.
The default action is to search in all of the available sections following a pre-defined order (“1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7” by default, unless overridden by the SECTION directive in /etc/manpath.config), and to show only the first page found, even if page exists in several sections.
中文:
- man命令是系统说明书的页面,man中的每个页面都是常用的程序、工具或方法的名字
- 然后找到并显示与每个参数相关的页面
- 如果有section的话,man会只看section的页面
- 默认是搜索所有可用的页面
man的命令类型
seq | content_e | content_c | example |
---|---|---|---|
1 | Executable programs or shell commands | 常用的系统命令 | man top |
2 | System calls (functions provided by the kernel) | 系统调用 | man 2 write |
3 | Library calls (functions within program libraries) | man 3 printf | |
4 | Special files (usually found in /dev) | 特殊文件,也就是/dev下的各种设备文件 | |
5 | File formats and conventions eg /etc/passwd | 文件的格式,比如passwd, 就会说明这个文件中各个字段的含义 | man 5 passwd |
6 | Games | ||
7 | Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7) | 其他命令 | man 7 environ |
8 | System administration commands (usually only for root) | only root | man 8 ifconfig |
因为有些命令在很多page都有,比如write等,那么想要查询指定的页面命令必须加上页面号
sections
Conventional section names include NAME, SYNOPSIS, CONFIGURATION, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUE, ERRORS, ENVIRONMENT, FILES, VERSIONS, CON-FORMING TO, NOTES, BUGS, EXAMPLE, AUTHORS, and SEE ALSO.
name | content |
---|---|
NAME | 命令名称 |
SYNOPSIS | 简介 |
CONFIGURATION | 配置 |
DESCRIPTION | 描述 |
OPTIONS | 参数 |
EXIT STATUS | |
RETURN VALUE | 返回值 |
ERRORS | |
ENVIRONMENT | |
FILES | |
VERSIONS | |
CONFORMING TO | |
NOTES | |
BUGS | |
EXAMPLE | 实例 |
AUTHORS | 作者 |
SEE ALSO | 其他 |