5

I was looking through some documentations for my university task and noticed that all of the syscalls there are followed by (2), like execv(2), fork(2) or fcntl(2). What do they represent?

Rerimodo
  • 53
  • 3

2 Answers2

5

Linux man pages are grouped in sections. Section 2 is "System calls (functions provided by the kernel".

  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]

Some man pages, such as unlink" exist in several categories (e.g. 1 and 2), so to browse the page of a specific category, run man section page (e.g. man 2 unlink to browse the syscall manual)

knittl
  • 246,190
  • 53
  • 318
  • 364
0

Sounds like the same approved answer in this post:

What does the number in parentheses shown after Unix command names in manpages mean?

"It's the section that the man page for the command is assigned to.

These are split as

General commands System calls C library functions Special files (usually devices, those found in /dev) and drivers File formats and conventions Games and screensavers Miscellanea System administration commands and daemons Original descriptions of each section can be seen in the Unix Programmer's Manual (page ii)."

confused
  • 139
  • 1
  • 11