How can I use a command’s manual page to understand its options?
Quick answer
Use man followed by a command name to request its manual page—for example, man ls. Read the option’s description in that page rather than guessing what it means. If the page is displayed in less, search with / followed by a term, use n or p to move between matches, and press q to quit. Controls can vary by viewer and system.
The question, the details, the next step.
A practical checklist
Enter
man [command]to request that command’s manual page, such asman ls.Find the option’s entry and read its complete description.
If the page is in
less, search with/[term]; usenorpto move between matches.Read the surrounding text and do not guess an option’s meaning from its letter.
Use the viewer’s documented quit control; Apple documents
qfor manual pages in macOS Terminal. [S1]
A few more useful answers
Does `man ls` run `ls`?
No. It requests the manual page for ls; it is different from entering ls to list directory contents.
Will `/`, `n`, `p`, and `q` work in every manual-page viewer?
What if I do not know the command name?
You need the command name to request its page with man [command]. Identify the command from the instructions you are following before looking up its options.
Sources
References used for this guide.
- [S1] Get started with Terminal on Mac support.apple.com · Checked
- [S2] View text files in Terminal on Mac support.apple.com · Checked
