Where to find documentation for `whois` command options?

macOS has whois command available. Running it without any argument shows the following:

usage: whois [-aAbfgiIklmPQrRS] [-c country-code | -h hostname] [-p port] name ...

Here, the -c, -h, and -p options have description. However, no description is available for the rest of the shown options -aAbfgiIklmPQrRS.

How can I find the documentation for the same?


You can read the man page for whois command by running the following in the Terminal:

man whois

The man page for a command is the all-encompassing document, listing all the available options for the command. Man pages are generally available for all the available external commands. To locate installed man page(s) for a command, run the following:

man -aw <command>

To read a specific man page for a command, (in case more than one are listed on running the above) use the absolute path for the man page.


While viewing the man page for a command, you can use the following keyboard shortcuts to navigate:

  • j: Scroll down one line at a time.

  • k: Scroll up one line at a time.

  • f or Space: Scroll down one page at a time.

  • b: Scroll up one page at a time.

  • /search: To search for the keyword search. Use n to navigate to the next match.

  • q: Quit the man page viewer and return to the shell.


Right-click on the name of the command and choose Open man Page
or ⌃⇧⌘? with the name of the command selected.

This opens the manual for the command in a new tab or window. You can browse this document using the scroll wheel as normal and perform regular operations like ⌘F for find.

This shortcut is also available on Touch Bar without needing to select the command name first.

Touch Bar screenshot


If you are keyboard ninja and do not wish to use the Mouse/Trackpad, there's an easy way to locate the man page(s) for a command.

Invoke the search under Terminal's Help menu by using the keyboard shortcut Command + Shift + /, and type in the command. The search looks for the man pages corresponding to the search term and lists them under Man Pages section.

enter image description here

Select and press Enter for the desired item to view the man page in the main window.