Different sections of manpages
We refer to manpages to get more information about the usage of a command or function but not many know that manpages are divided into 9 different sections (8 standard + 1 extra) based on the classification of commands or functions it is being used for.
Lets take the example of the command “mkdir”. As a command, its use is to create a directory. But its also a system call. In simple terms, its a function provided by the kernel for application programmers. In order to view its manpage you need to access the 2nd category of manpages. It can be done by using "man 2". Here is a comparison of both man pages.
[shredder12]$ man mkdir
[Manpage of mkdir command]
[shredder12]$ man 2 mkdir
[manpage of mkdir syscall]
If you notice the underlined points(in red) in both manpages, they are used to notify the reader the category of the manpage.
Similarly, for others you can access the corresponding manpage using the apporpriate command. Here are the 9 categories in which man pages are broadly classified. You can view them in the manpage of man
.
[shredder12]$ man man





























Post new comment