Manual

From Hackepedia
Revision as of 11:28, 26 October 2005 by Pbug (talk | contribs)
Jump to navigationJump to search

Most UNIX systems have online manual pages. The types of manpages have sections which they are grouped in. Here is the layout of BSD:


Section 1
General commands (tools and utilities)
Section 2
System calls and error numbers
Section 3
Library functions, especially for C and Tk
Section 4
Special files and hardware support
Section 5
File formats, especially configuration files
Section 6
Games
Section 7
Miscellaneous information pages
Section 8
System maintenance and operation commands
Section 9
Kernel internals


When someone tells you to run "man 6 tetris", that means that you should read the tetris manpage found in section 6 of the manpages. Sometimes the same manpage name exists, but in different sections. One example is the fstat manpage it exists in sections 1 and 2. The lower number sections take precedence over higher numbered sections. Thus, to see the manpage for fstat in section 2 you would type:

$ man 2 fstat

Similarely functions, syscalls or commands are sometimes mentioned with the section of manpages in brackets behind them like so: fstat(2), you'll see this mentioned a lot in this wiki.

It is possible to do a keyword search in the manpage system.

$ man -k filesystem
OpenBSD::Vstat (3p) - virtual filesystem for pkg_add(1) simulations
dump (8) - filesystem backup
fstab (5) - static information about the filesystems
...

Another command synonymous to man -k is apropos:

$ apropos archiver
tar (1) - tape archiver

Do notice that the section of the manpage are displayed in the keyword search, this is to ease viewing the particular manpage.