In Linux, how do I get man pages for C functions rather than for bash commands?

George picture George · Sep 20, 2013 · Viewed 25.5k times · Source

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.

Answer

Joe picture Joe · Sep 20, 2013
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!