2 min read

Reading Manual Pages with Man on macOS Tahoe

In the world of Unix and macOS, the most reliable source of information is often right at your fingertips. The man (manual) command provides the official documentation for almost every command-line utility installed on your system.

Opening a Manual Page

To read the manual for a specific command, simply type man followed by the command name.

man ls

This opens the manual page for the ls command, explaining its purpose, syntax, and available flags (options).

Man pages open in a "pager" (usually less), which allows you to scroll through text that doesn't fit on one screen.

  • Spacebar: Scroll down one full screen.
  • Enter: Scroll down one line.
  • b: Scroll back up one full screen.
  • d: Scroll down half a screen.
  • u: Scroll up half a screen.
  • q: Quit the manual and return to the command prompt.

Searching Within a Page

Manual pages can be very long. To find a specific flag or keyword:

  1. Press / (forward slash).
  2. Type your search term (e.g., sort).
  3. Press Enter.

The first match will be highlighted.

  • Press n to jump to the next match.
  • Press N (Shift + n) to jump to the previous match.

Understanding the Layout

Most man pages follow a standard structure:

  • NAME: The name of the command and a one-line description.
  • SYNOPSIS: How to run the command (syntax).
  • DESCRIPTION: A detailed explanation of what the command does.
  • OPTIONS: A list of flags (like -l or -a) and what they do.
  • EXAMPLES: Common ways to use the command.
  • SEE ALSO: Related commands.

Finding the Right Command

If you don't know the exact name of the command you need, you can search the descriptions of all man pages using the -k flag (equivalent to the apropos command).

Example: Find commands related to "network":

man -k network

For more on general terminal usage, refer to Getting Started with macOS Tahoe.