OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

man – Display A Program's Manual Page

Most executable programs intended for command line use provide a formal piece of doc- umentation called a manual or man page. A special paging program called man is used to view them. It is used like this:


man program

man program


where “program” is the name of the command to view.

Man pages vary somewhat in format but generally contain a title, a synopsis of the com - mand's syntax, a description of the command's purpose, and a listing and description of each of the command's options. Man pages, however, do not usually include examples, and are intended as a reference, not a tutorial. As an example, let's try viewing the man page for the ls command:


[me@linuxbox ~]$ man ls

[me@linuxbox ~]$ man ls


On most Linux systems, man uses less to display the manual page, so all of the familiar

less commands work while displaying the page.

The “manual” that man displays is broken into sections and not only covers user com- mands but also system administration commands, programming interfaces, file formats and more. The table below describes the layout of the manual:


Table 5-1: Man Page Organization


Section Contents

Section Contents

1 User commands


image

2 Programming interfaces for kernel system calls


image

3 Programming interfaces to the C library


image

4 Special files such as device nodes and drivers


image

5 File formats


image

6 Games and amusements such as screen savers


image

7 Miscellaneous


image

8 System administration commands


image


Sometimes we need to look in a specific section of the manual to find what we are look- ing for. This is particularly true if we are looking for a file format that is also the name of a command. Without specifying a section number, we will always get the first instance of a match, probably in section 1. To specify a section number, we use man like this:


man section search_term

man section search_term


For example:



[me@linuxbox ~]$ man 5 passwd

[me@linuxbox ~]$ man 5 passwd


This will display the man page describing the file format of the /etc/passwd file.


Top OS Cloud Computing at OnWorks: