Athena, like most UNIX-based operating systems, has an online manual, which is divided into pages. Most commands on Athena have pages in the manual ("man pages") which can be read electronically. The manual is divided into 8 numbered sections, which helps separate manual pages by category. Manual pages are often abbreviated in documentation as the name of the command followed by the section number in parentheses. For example "rmdir(1)" means the manual page for the "rmdir" command in section 1 of the manual. Usually, you won't have to worry about the section number, since there's only a single man page for most commands, but in some cases, there are manual pages of the same name in different sections. For example, "rmdir" is both a command and a function used in C programming. The manual page for the command is in section 1, but the manual page for the C function is in section 3.
Manual pages are divided into the following sections:
- NAME: the name and a brief description of the command
- SYNOPSIS: how to use the command, including a listing of the various options and arguments you can use with the command. Square brackets ([ ]) are often used to indicate optional arguments. Any arguments or options that are not in square brackets are required. A pipe (|) is often used to represent the word "or". For example, the synopsis "mycommand -a | -b" means that you can use either the -a or -b option, but you can't use both at the same time.
- DESCRIPTION: a more detailed description of the command including descriptions of each option
- SEE ALSO: References to other man pages that may be helpful in understanding how to use the command in question. These may also be pages of the same name in another section of the manual.
To view a manual page, you use the man command:
joeuser@athena$ man commandname
For example, to view the manual page for the rmdir command:
joeuser@athena$ man rmdir
This will cause your Terminal window to clear and display the manual page in question, along with a highlighted bar at the bottom of the screen telling you that you're viewing a manual page. When viewing a man page, you can press spacebar to view the next screen, b (for "back") to view the previous screen, or use the arrow keys to navigate. When you have finished reading the page, you can press q to quit and return to your shell prompt.
Tip: The manual page viewer actually uses the more command, which you can read about later in this document.
By default, the man command will display the first man page with a matching name that it finds. If you want to read a man page of the same name in a different section of the manual, you'll need to specify the section number. For example, to read the rmdir man page in section 3:
joeuser@athena$ man 3 rmdir
Manual pages are available in various locations on the Internet. Athena is currently based on Ubuntu, and all the Ubuntu manual pages are online at http://manpages.ubuntu.com/.