In Linux, how do I get the man pages for C functions rather than shell commands?
For example, when I type man bind
I get the manual page for the shell command bind
and not the man page for socket binding C function.
To use man , you type man on the command line, followed by a space and a Linux command. man opens the Linux manual to the “man page” that describes that command—if it can find it, of course. The man page for man opens.
To search a specific man page section, use the -s option with the man command and the -k or -K option.
Each man page comes in sections. The table below shows the section numbers of the manual followed by the types of pages they contain: Section # 1 : User command (executable programs or shell commands) Section # 2 : System calls (functions provided by the kernel)
man command in Linux is used to display the user manual of any command that we can run on the terminal. It provides a detailed view of the command which includes NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUES, ERRORS, FILES, VERSIONS, EXAMPLES, AUTHORS and SEE ALSO.
man 2 bind
You need a result from a different section of the manual! Man searches various sections for the information you want. As devnull lists below, the number indicates which section to search.
Incidentally, bind
is a system call, not a C library function. System calls (kernel calls) are in section 2 of the manual, library functions are in section 3.
man man
will tell you how to use the man command!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With