Articles
Published · November 18, 2026

How to Read a man Page SYNOPSIS: Brackets, Bars, and Ellipses

Square brackets mean optional, a bar means pick one, an ellipsis means repeatable. Here is how to read a man page SYNOPSIS line by line.

Also in: Español中文हिन्दी

The SYNOPSIS section of a man page is a one-line grammar for the command: square brackets mean optional, a vertical bar means pick one, and an ellipsis means the thing can repeat. Once you know those three marks and the bold and italic convention, most synopses read at a glance.

If you keep command notes in a notes app, this is worth ten minutes. A note that says [-n] is optional, or that file... takes several files, saves you a second trip to man.

Where the SYNOPSIS sits on a man page

Man pages share a common layout. Wikipedia's article on man pages lists the usual sections as NAME, SYNOPSIS, DESCRIPTION, EXAMPLES, and SEE ALSO, and notes the layout was designed to work on a simple ASCII display with no highlighting or font control.

For a command, the SYNOPSIS is "a formal description of how to run it and what command line options it takes." For a program function, it lists the parameters and the header file that declares it. The Linux man-pages(7) style guide calls it "a brief summary of the command or function's interface" and says most pages should include at least NAME, SYNOPSIS, DESCRIPTION, and SEE ALSO.

The manual is also split into numbered sections. Section 1 holds general commands, 2 system calls, 3 library functions, and 8 system administration commands. That is why you see names like ls(1): the number says which section to look in. Sections 1 and 8 are the ones with command-style synopses.

Brackets, bars, and ellipses

Three symbols carry most of the meaning. The man-pages(7) guide puts it in one line: "Brackets ([]) surround optional arguments, vertical bars (|) separate choices, and ellipses (...) can be repeated."

Square brackets: optional

Anything inside [ ] can be left out. Anything outside is required.

Vertical bar: pick one

Arguments separated by | are mutually exclusive. The POSIX utility conventions say "only one of the mutually-exclusive arguments is allowed for invocation of the utility."

Ellipsis: repeatable

An ellipsis (...) after an operand means you can give it more than once. POSIX defines it as one or more occurrences. If the operand and its ellipsis sit inside brackets, it means zero or more.

None of these marks are typed. POSIX is explicit that conforming applications "shall not include the '[' and ']' symbols in data submitted to the utility," and the same goes for the | bar.

Here is a made-up synopsis, not taken from any real tool, so you can practice:

mytool [-v] [-o file] (start | stop) name...

Read it left to right:

  • [-v]: an optional flag.
  • [-o file]: an optional flag that takes a value you supply.
  • (start | stop): you must choose exactly one. Some pages leave out the parentheses and write the bar inside brackets or plain text, so check the DESCRIPTION when it is unclear.
  • name...: at least one name, and you can add more.

A valid command from that line is mytool -v start alpha beta.

Bold, italic, and plain text

In the terminal, man pages often show bold and underlined or italic text, and that styling carries meaning. Under the Linux style guide, "boldface is used for as-is text and italics are used to indicate replaceable arguments." The command name and its options are always bold. On command pages, arguments are always italic, even in the SYNOPSIS.

So in the line above, -o would be bold because you type it exactly, and file would be italic because you replace it with your own file name. A page rendered as plain text may lose that styling, which is why the brackets and ellipses matter: they carry the meaning even when fonts do not.

You can see the same pattern in real commands such as the ones in our article on reading rwxr-xr-x and chmod modes, where the mode is a replaceable value and the flags are typed as shown.

Options and operands

POSIX gives two names worth knowing. Options are arguments made of a hyphen and a single letter or digit, such as -a. Some options take an option-argument, like [ -c option_argument]. The arguments after the last option are operands.

Two guidelines help when you read command lines. Options should come before operands. And the first -- argument that is not an option-argument should be accepted as the end of options, so everything after it is treated as an operand even if it starts with a hyphen. That is the trick for a file named -notes.txt.

A worked example

Try this on a command you already use. Run man ln, find the SYNOPSIS, and decode it with the rules above: which forms are alternatives, which arguments are optional, and which can repeat. Our guide to showing one notes folder in two places with `ln -s` gives you a real use to test it against.

For editors, the same reading skills apply when you need a quick config edit in vim or nano. Pull up the page, read the synopsis, and write the one line you need into your notes.

If a synopsis still looks odd, three habits help:

  1. Read the DESCRIPTION for each option; the synopsis only shows shape.
  2. Check the page's section number, since printf(1) and printf(3) are different pages.
  3. Look at the EXAMPLES section if there is one, then compare it with the synopsis.

The symbol set is small enough to remember. For another notation worth learning, see reading a unified diff.

Doing this with Carets

Command notes only help if you can find them later. Carets is a fast, native notes and code editor for iPhone, iPad, and Mac. It handles Markdown, plain text, and code in one place, so a decoded synopsis can live in a fenced code block next to your explanation.

Three features fit this job. Syntax highlighting makes shell snippets and config files easy to scan. Files, projects, and tags let you group command notes by tool, so ln, chmod, and vim notes sit together. And because it is built natively for iOS and Mac rather than as a web wrapper, a note opens quickly when you need it mid-task. Carets is not a terminal or a full IDE, so you will still run commands elsewhere.

Get Carets on the App Store for iPhone, iPad, and Mac.

Frequently Asked Questions

Do I type the square brackets in a command?

No. Brackets only mark an argument as optional. POSIX says conforming applications must not include the [ and ] symbols in data submitted to the utility. The same applies to the | bar.

What does an ellipsis after an argument mean?

The argument can repeat. In POSIX terms, an operand followed by an ellipsis allows one or more occurrences. If it is also wrapped in brackets, it means zero or more.

Why are some words bold and others italic?

In Linux man pages, bold is text you type exactly as shown, such as the command name and its options. Italic marks a placeholder you replace with your own value. A plain terminal may render these differently.

What do the numbers in names like ls(1) or open(2) mean?

They are manual section numbers. Section 1 is general commands, 2 is system calls, 3 is library functions, and 8 is system administration commands.