Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

The man (Manual) Command in Linux

Read the built-in manual pages to learn what any Linux command does and which options it has.

How-To Guides2 min read5 screenshots

What is man

man shows the manual page of a command, a function or a file format. It is the quickest way to learn a command without leaving the terminal.

Syntax

man [option] [section] [command]

Common options

  • -f or --whatis shows a one-line description of the command.
  • -k or --apropos searches the manual names and descriptions for a keyword.
  • -a or --all shows all matching manual pages one after the other.

Move around a manual page

  • Space moves forward one page.
  • Enter moves forward one line.
  • b moves back one page.
  • /word searches for a word, and n goes to the next match.
  • q quits.

Examples

1. Read the manual of a command

man cat
The manual page of the cat command

2. Search by keyword

man -k systemctl
Searching for commands related to a keyword

The same search is available as apropos systemctl.

3. Read a specific section

Manuals are split into sections:

SectionContent
1User commands
2System calls
3Library functions
4Special files (devices)
5File formats and configuration
6Games
7Overviews and conventions
8Administration commands

The name printf is both a command (section 1) and a C function (section 3). Pick the section:

man 3 printf
The printf manual in section 3

4. Find a system call

man 2 open
Finding information about a system call

5. Find a specific section of a page

Show where the page lives and list all its sections:

man -f printf
Finding a specific section

Tips

  • Use command --help for a shorter summary.
  • Use info command for longer GNU documentation.
  • man man explains the manual system itself.
  • If a page is missing, install the manual package, for example sudo apt install man-db manpages.

Quick recap

  • man command shows the manual, man -k word searches.
  • Quit with q.