OS X Server Admin: Get help for command-line tools

Most command-line documentation comes in the form of man (short for manual) pages.

Man pages provide reference information for shell commands, tools, and high-level concepts.

To view a man page, enter:

$ man tool

Replace tool with the name of the command-line tool you want to find information about. The man page contains details about the tool, its options and parameters, and proper use.

For help using the man command itself, enter:

$ man man

While viewing a man page, you can press the Space bar to go to the next page, the B key to go back a page, or the Return key to scroll forward one line at a time. Press the Q key to exit the man page.

You can search the contents of a man page you’re viewing by pressing the / key followed by the word you’re looking for. If multiple instances are found, use the P and N keys to access the previous and next instances of the term.

If you don’t know the name of a man page, you can search the available man pages by entering:

$ man -k topic

Replace topic with a word that might be contained in the man page you’re looking for.

For example, the following command returns references to the odutil and opendirectoryd man pages:

$ man -k opendirectoryd

You can also find links to related man pages at the bottom of a man page in the See Also section.

You can view man pages on the Apple Developer website at developer.apple.com/library/mac/#documentation/darwin/reference/manpages/.

If Xcode tools are installed, you can view man pages in Xcode by choosing “Open man page...” from the Help menu.

There are also several third-party OS X apps available for viewing man pages. You can find them by searching the Mac App Store for “man” or searching the web for “OS X man page viewer.”

Published Date: Jan 22, 2015
Helpful?
24% of people found this helpful.