man 命令指定section

我们知道,linux下的man手册是我们开发很好的参考资料,为了快速的定位出我们要参考资料,我们可以在查询的时候指定资料的section索引号。man在内部把按照功能将这些资料分为了9个seciton,这些section索引号与对应section功能的对应关系如下:

section number description
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]

很明显了,如果想查shell命令的手册就输入man 1 xxx
例如

man 1 ls

想查系统调用函数的手册输入man 2 xxx
例如:

man 2 read

想查标准库函数的手册输入 man 3 xxx
例如:

man 3 printf

猜你喜欢

转载自blog.csdn.net/jmh1996/article/details/80459964
man