Solaris Advanced User's Guide

Getting Help With OS Commands

This section describes various online help features. These features enable you to view reference information from your workstation or terminal.

Displaying Manual Pages With man

If you know the name of a command, but you are not sure what it does, the man command can be helpful. Type the following to find out more about this command:


$ man man

This command displays the first part of a SunOS manual reference page in the window display area. Press the space bar to see the next screen, or press the Q key to quit and return to the command prompt. Use the man command to see all the available options and to show the proper command syntax. Manual reference pages often provide examples that illustrate various uses of the command.

Displaying a One-line Summary With whatis

If you want just a one-line summary of the command's function, use the whatis command, as shown here:


$ whatis date
date (1)           -display or set the date
$

The number in parentheses after the command name in the previous example indicates the Reference Manual section to which this command belongs. Commands are grouped into various categories according to function. Most user commands are in section 1. By common convention, the section number is displayed in parentheses after the name of the command. You can find the printed manual reference page for a command in alphabetical order within its group.


Note –

The whatis command is only available if your system administrator has set up a special database of command descriptions.


Keyword Lookup With apropos

If you know what you want to do, but you do not know which command to use, use the apropos command to locate commands by keyword lookup. The apropos command lists all commands that have one-line summaries that contain any keywords you supply. The output of the apropos can be lengthy, as some keywords might appear in many places.


Note –

The apropos command is only available if your system administrator has set up a special database of command descriptions.


To view examples of apropos output, type one or more of the following commands.

If you do type a keyword that generates an unreasonably lengthy display, press Ctrl-C to interrupt the display and return you to the command prompt. Hold down the Control key and press “c.”