3

This might be a silly question. but I was wandering a long time searching for this .but couldn't solve. For some functions I've seen (8) also. They are mostly seen on documentations. Could anyone please help.

alk
  • 69,737
  • 10
  • 105
  • 255
Laksith
  • 354
  • 3
  • 20

2 Answers2

6

Often in the manual man you will see numbers after the functions to distinguish which section of the manual the page comes from.

You can view malloc(3) by typeing man 3 malloc on a unix style terminal with the appropriate man pages installed.

These are not specific to the C language.

ilent2
  • 5,171
  • 3
  • 21
  • 30
4

The man pages are divided into sections with different topics:

1 User Commands
2 System Calls
3 C Library Functions
4 Devices and Special Files
5 File Formats and Conventions
6 Games et. al.
7 Miscellanea
8 System Administration tools

man 2 open will look for open in system calls and tell you details about the Linux system call, while man 3 open will look for open in C Library Functions and tell you about the ANSI or POSIX specification of open.

See the difference here for example:
http://linux.die.net/man/2/open
http://linux.die.net/man/3/open

John Hammond
  • 467
  • 1
  • 4
  • 14
  • thankz. sory I didn't get it clearly. So how do you enter it in the man pages.I mean how to enter it in the commandline "man malloc 3 " some other thing – Laksith Sep 11 '15 at 09:33