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?
Linux man pages are grouped in sections. Section 2 is "System calls (functions provided by the kernel".
- Executable programs or shell commands
- System calls (functions provided by the kernel)
- Library calls (functions within program libraries)
- Special files (usually found in /dev)
- File formats and conventions eg /etc/passwd
- Games
- Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
- System administration commands (usually only for root)
- 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) or man page.section
(e.g. man unlink.2
).