Introduction to Linux

106 38

2.3.2. The man pages


A lot of beginning users fear the man (manual) pages, because they are an overwhelming source of documentation. They are, however, very structured, as you will see from the example below on: man man .

Reading man pages is usually done in a terminal window when in graphical mode, or just in text mode if you prefer it. Type the command like this at the prompt, followed by Enter :

   

yourname@yourcomp ~>man man
The documentation for man will be displayed on your screen after you press Enter :

   

man(1) man(1)NAME man - format and display the on-line manual pages manpath - determine user's search path for man pagesSYNOPSIS man [-acdfFhkKtwW] [--path] [-m system] [-p string] [-C config_file] [-M pathlist] [-P pager] [-S section_list] [section] name ... DESCRIPTION man formats and displays the on-line manual pages. If you specify section, man only looks in that section of the manual.name is normally the name of the manual page, which is typically thename of a command, function, or file. However, if name contains aslash (/) then man interprets it as a file specification, so that you can do man ./foo.5 or even man /cd/foo/bar.1.gz.See below for a description of where man looks for the manual page files.OPTIONS -C config_file lines 1-27
Browse to the next page using the space bar. You can go back to the previous page using the b-key.

When you reach the end, man will usually quit and you get the prompt back. Type q if you want to leave the man page before reaching the end, or if the viewer does not quit automatically at the end of the page.

       Pagers
        

The available key combinations for manipulating the man pages depend on the pager used in your distribution. Most distributions use less to view the man pages and to scroll around. See Section 3.3.4.2 for more info on pagers.

Each man page usually contains a couple of standard sections, as we can see from the man man example:
  • The first line contains the name of the command you are reading about, and the id of the section in which this man page is located. The man pages are ordered in chapters. Commands are likely to have multiple man pages, for example the man page from the user section, the man page from the system admin section, and the man page from the programmer section.
  • The name of the command and a short description are given, which is used for building an index of the man pages. You can look for any given search string in this index using the apropos command.
  • The synopsis of the command provides a technical notation of all the options and/or arguments this command can take. You can think of an option as a way of executing the command. The argument is what you execute it on. Some commands have no options or no arguments. Optional options and arguments are put in between "[" and "]" to indicate that they can be left out.
  • A longer description of the command is given.
  • Options with their descriptions are listed. Options can usually be combined. If not so, this section will tell you about it.
  • Environment describes the shell variables that influence the behavior of this command (not all commands have this).
  • Sometimes sections specific to this command are provided, such as the CAT PAGES section in the example.
  • A reference to other man pages is given in the "SEE ALSO" section. In between parentheses is the number of the man page section in which to find this command. Experienced users often switch to the "SEE ALSO" part using the / command followed by the search string SEE and press Enter .
  • Usually there is also

* License

* Introduction to Linux Index
Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.